Update app.py
Browse files
app.py
CHANGED
@@ -256,6 +256,6 @@ with gr.Blocks(css=css,head=js,fill_height=True) as demo:
|
|
256 |
result.change(fn=lambda x:x, inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_finished","demo_hf_{cfg.get("name")}_card", "finish")''')
|
257 |
run_button.click(generate, inputs=[prompt], outputs=[result], js=f'''(p)=>window.postMessageToParent(p,"process_started","demo_hf_{cfg.get("name")}_card", "click_go")''')
|
258 |
random_button.click(fn=lambda x:x, inputs=[prompt], outputs=[prompt], js='''(p)=>window.g(p)''')
|
259 |
-
demo.load(fn=on_demo_load, inputs=[gr.Label(
|
260 |
if __name__ == "__main__":
|
261 |
demo.queue().launch(show_api=False)
|
|
|
256 |
result.change(fn=lambda x:x, inputs=[prompt,result], outputs=[], js=f'''(p,img)=>window.uploadImage(p, img,"process_finished","demo_hf_{cfg.get("name")}_card", "finish")''')
|
257 |
run_button.click(generate, inputs=[prompt], outputs=[result], js=f'''(p)=>window.postMessageToParent(p,"process_started","demo_hf_{cfg.get("name")}_card", "click_go")''')
|
258 |
random_button.click(fn=lambda x:x, inputs=[prompt], outputs=[prompt], js='''(p)=>window.g(p)''')
|
259 |
+
demo.load(fn=on_demo_load, inputs=[gr.Label(visible=False),gr.Label(visible=False)], outputs=[result], js='''(dummy1,dummy2)=>onDemoLoad()''')
|
260 |
if __name__ == "__main__":
|
261 |
demo.queue().launch(show_api=False)
|