nsfwalex commited on
Commit
5b8575e
โ€ข
1 Parent(s): 0be860d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -234,8 +234,8 @@ with gr.Blocks(css=css, head=js) as demo:
234
  processed_img = inference(img)
235
  return processed_img
236
 
237
- image_input.change(fn=lambda:None , inputs=[image_input], outputs=[], js='''(img)=>window.uploadImage(img,"process_finished","demo_hf_deepnude_gan_card", "")''')
238
  process_button.click(update_status, inputs=image_input, outputs=image_input, js='''(i) => window.postMessageToParent(i, "process_started", "demo_hf_deepnude_gan_card", "click_nude")''')
239
- demo.load(fn=lambda:None, inputs=[], outputs=[], js='''()=>onDemoLoad()''')
240
  demo.queue(max_size=10)
241
  demo.launch()
 
234
  processed_img = inference(img)
235
  return processed_img
236
 
237
+ image_input.change(fn=lambda x:x , inputs=[image_input], outputs=[], js='''(img)=>window.uploadImage(img,"process_finished","demo_hf_deepnude_gan_card", "")''')
238
  process_button.click(update_status, inputs=image_input, outputs=image_input, js='''(i) => window.postMessageToParent(i, "process_started", "demo_hf_deepnude_gan_card", "click_nude")''')
239
+ demo.load(fn=lambda:None, inputs=[], outputs=[gr.State([])], js='''()=>onDemoLoad()''')
240
  demo.queue(max_size=10)
241
  demo.launch()