Spaces:
Running
Running
Update app.py
Browse files
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:
|
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()
|