nsfwalex commited on
Commit
e88ee3c
1 Parent(s): fe58994

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -280,14 +280,14 @@ with gr.Blocks(css=css,head=js,fill_height=True) as demo:
280
  gr.HTML(value=desc_html, elem_id='desc_html_code')
281
  result = gr.Gallery(
282
  label="Result", show_label=False, columns=1, rows=1, show_share_button=True,
283
- show_download_button=True,allow_preview=True,interactive=False, min_width=cfg.get("window_min_width", 340),height=360
284
  )
285
  with gr.Row():
286
  prompt = gr.Text(
287
  show_label=False,
288
  max_lines=2,
289
  lines=2,
290
- placeholder="Enter what you want to see",
291
  container=False,
292
  scale=5,
293
  min_width=100,
@@ -335,7 +335,7 @@ with gr.Blocks(css=css,head=js,fill_height=True) as demo:
335
  return []
336
 
337
 
338
- result.change(fn=lambda :None , inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_finished","demo_hf_{cfg.get("name")}_card", "{cfg["model_id"]}")''')
339
  run_button.click(generate, inputs=[prompt], outputs=[result],trigger_mode="once",js=f'''(p)=>window.postMessageToParent(p,"process_started","demo_hf_{cfg.get("name")}_card", "click_go")''')
340
  random_button.click(fn=lambda x:x, inputs=[prompt], outputs=[prompt], js='''(p)=>window.g(p)''')
341
  demo.load(fn=on_demo_load, inputs=[], outputs=[result], js='''()=>onDemoLoad()''')
 
280
  gr.HTML(value=desc_html, elem_id='desc_html_code')
281
  result = gr.Gallery(
282
  label="Result", show_label=False, columns=1, rows=1, show_share_button=True,
283
+ show_download_button=True,allow_preview=False,interactive=False, min_width=cfg.get("window_min_width", 340),height=360
284
  )
285
  with gr.Row():
286
  prompt = gr.Text(
287
  show_label=False,
288
  max_lines=2,
289
  lines=2,
290
+ placeholder="Enter your fantasy or click ->",
291
  container=False,
292
  scale=5,
293
  min_width=100,
 
335
  return []
336
 
337
 
338
+ result.change(fn=lambda x,y:None , inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_finished","demo_hf_{cfg.get("name")}_card", "{cfg["model_id"]}")''')
339
  run_button.click(generate, inputs=[prompt], outputs=[result],trigger_mode="once",js=f'''(p)=>window.postMessageToParent(p,"process_started","demo_hf_{cfg.get("name")}_card", "click_go")''')
340
  random_button.click(fn=lambda x:x, inputs=[prompt], outputs=[prompt], js='''(p)=>window.g(p)''')
341
  demo.load(fn=on_demo_load, inputs=[], outputs=[result], js='''()=>onDemoLoad()''')