Revert user history feature

#6
by Wauplin HF staff - opened
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -10,7 +10,7 @@ from diffusers import WuerstchenDecoderPipeline, WuerstchenPriorPipeline
10
  from diffusers.pipelines.wuerstchen import DEFAULT_STAGE_C_TIMESTEPS
11
  from previewer.modules import Previewer
12
 
13
- from gallery_history import fetch_gallery_history, show_gallery_history
14
 
15
  os.environ['TOKENIZERS_PARALLELISM'] = 'false'
16
 
@@ -213,7 +213,7 @@ with gr.Blocks(css="style.css") as demo:
213
  cache_examples=CACHE_EXAMPLES,
214
  )
215
 
216
- history = show_gallery_history()
217
 
218
  inputs = [
219
  prompt,
@@ -240,9 +240,10 @@ with gr.Blocks(css="style.css") as demo:
240
  inputs=inputs,
241
  outputs=result,
242
  api_name="run",
243
- ).then(
244
- fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
245
  )
 
 
 
246
  negative_prompt.submit(
247
  fn=randomize_seed_fn,
248
  inputs=[seed, randomize_seed],
@@ -254,9 +255,10 @@ with gr.Blocks(css="style.css") as demo:
254
  inputs=inputs,
255
  outputs=result,
256
  api_name=False,
257
- ).then(
258
- fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
259
  )
 
 
 
260
  run_button.click(
261
  fn=randomize_seed_fn,
262
  inputs=[seed, randomize_seed],
@@ -268,9 +270,10 @@ with gr.Blocks(css="style.css") as demo:
268
  inputs=inputs,
269
  outputs=result,
270
  api_name=False,
271
- ).then(
272
- fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
273
  )
 
 
 
274
 
275
  if __name__ == "__main__":
276
  demo.queue(max_size=20).launch()
 
10
  from diffusers.pipelines.wuerstchen import DEFAULT_STAGE_C_TIMESTEPS
11
  from previewer.modules import Previewer
12
 
13
+ #from gallery_history import fetch_gallery_history, show_gallery_history
14
 
15
  os.environ['TOKENIZERS_PARALLELISM'] = 'false'
16
 
 
213
  cache_examples=CACHE_EXAMPLES,
214
  )
215
 
216
+ #history = show_gallery_history()
217
 
218
  inputs = [
219
  prompt,
 
240
  inputs=inputs,
241
  outputs=result,
242
  api_name="run",
 
 
243
  )
244
+ #.then(
245
+ # fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
246
+ #)
247
  negative_prompt.submit(
248
  fn=randomize_seed_fn,
249
  inputs=[seed, randomize_seed],
 
255
  inputs=inputs,
256
  outputs=result,
257
  api_name=False,
 
 
258
  )
259
+ #.then(
260
+ # fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
261
+ #)
262
  run_button.click(
263
  fn=randomize_seed_fn,
264
  inputs=[seed, randomize_seed],
 
270
  inputs=inputs,
271
  outputs=result,
272
  api_name=False,
 
 
273
  )
274
+ #.then(
275
+ # fn=fetch_gallery_history, inputs=[prompt, result], outputs=history
276
+ #)
277
 
278
  if __name__ == "__main__":
279
  demo.queue(max_size=20).launch()