Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def show_indirect_evidence():
|
|
| 32 |
def reset_fields():
|
| 33 |
global indirect_evidence_store
|
| 34 |
indirect_evidence_store = ""
|
| 35 |
-
return "", gr.update(visible=False), gr.update(value="", visible=False)
|
| 36 |
|
| 37 |
# Create the Gradio interface
|
| 38 |
with gr.Blocks() as demo:
|
|
@@ -51,7 +51,8 @@ with gr.Blocks() as demo:
|
|
| 51 |
# Bind actions to functions
|
| 52 |
query_button.click(query_data, inputs=input_box, outputs=[output_box, indirect_button, indirect_output])
|
| 53 |
indirect_button.click(show_indirect_evidence, inputs=None, outputs=indirect_output)
|
| 54 |
-
reset_button.click(reset_fields, inputs=None, outputs=[input_box, indirect_button, indirect_output])
|
| 55 |
|
| 56 |
# Launch the Gradio app
|
| 57 |
demo.launch()
|
|
|
|
|
|
| 32 |
def reset_fields():
|
| 33 |
global indirect_evidence_store
|
| 34 |
indirect_evidence_store = ""
|
| 35 |
+
return "", gr.update(visible=False), gr.update(value="", visible=False), gr.update(value="", visible=True)
|
| 36 |
|
| 37 |
# Create the Gradio interface
|
| 38 |
with gr.Blocks() as demo:
|
|
|
|
| 51 |
# Bind actions to functions
|
| 52 |
query_button.click(query_data, inputs=input_box, outputs=[output_box, indirect_button, indirect_output])
|
| 53 |
indirect_button.click(show_indirect_evidence, inputs=None, outputs=indirect_output)
|
| 54 |
+
reset_button.click(reset_fields, inputs=None, outputs=[input_box, indirect_button, indirect_output, output_box])
|
| 55 |
|
| 56 |
# Launch the Gradio app
|
| 57 |
demo.launch()
|
| 58 |
+
|