yuvalkirstain commited on
Commit
9965b9d
1 Parent(s): 16e9c84

reset probs when changing the prompt

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -81,6 +81,7 @@ with gr.Blocks(title="PickScore v1") as demo:
81
 
82
  btn = gr.Button("Run")
83
  btn.click(fn=predict, inputs=[prompt, image_1, image_2], outputs=[pred_1, pred_2])
 
84
 
85
  gr.Examples(
86
  [[open(f'{path}/prompt.txt').readline(), f'{path}/image_1.png', f'{path}/image_2.png'] for path in
 
81
 
82
  btn = gr.Button("Run")
83
  btn.click(fn=predict, inputs=[prompt, image_1, image_2], outputs=[pred_1, pred_2])
84
+ prompt.change(lambda: ("", ""), inputs=[], outputs=[pred_1, pred_2])
85
 
86
  gr.Examples(
87
  [[open(f'{path}/prompt.txt').readline(), f'{path}/image_1.png', f'{path}/image_2.png'] for path in