Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -576,6 +576,7 @@ def clear(input_language, audio_input, image_input, text_input):
|
|
| 576 |
# Reset each input to its default state
|
| 577 |
return "", None, None, "", []
|
| 578 |
|
|
|
|
| 579 |
def create_interface():
|
| 580 |
with gr.Blocks(theme='ParityError/Anime') as iface:
|
| 581 |
input_language = gr.Dropdown(languages, label="Select the language", value="English", interactive=True)
|
|
@@ -591,14 +592,15 @@ def create_interface():
|
|
| 591 |
with gr.Accordion("MultiMed", open=False) as multimend_accordion:
|
| 592 |
text_input = gr.Textbox(label="Use Text", lines=5)
|
| 593 |
text_output = gr.Markdown(label="Output text")
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
|
|
|
|
|
|
| 597 |
|
| 598 |
clear_button = gr.Button("Clear")
|
| 599 |
# Link the clear function to the clear button
|
| 600 |
-
clear_button.click(clear, inputs=[input_language, audio_input, image_input, text_input], outputs=[input_language, audio_input, image_input, text_input, voice_accordion])
|
| 601 |
-
|
| 602 |
|
| 603 |
return iface
|
| 604 |
|
|
|
|
| 576 |
# Reset each input to its default state
|
| 577 |
return "", None, None, "", []
|
| 578 |
|
| 579 |
+
|
| 580 |
def create_interface():
|
| 581 |
with gr.Blocks(theme='ParityError/Anime') as iface:
|
| 582 |
input_language = gr.Dropdown(languages, label="Select the language", value="English", interactive=True)
|
|
|
|
| 592 |
with gr.Accordion("MultiMed", open=False) as multimend_accordion:
|
| 593 |
text_input = gr.Textbox(label="Use Text", lines=5)
|
| 594 |
text_output = gr.Markdown(label="Output text")
|
| 595 |
+
|
| 596 |
+
# Moved the MultiMed button outside of the accordion
|
| 597 |
+
text_button = gr.Button("Use MultiMed")
|
| 598 |
+
hallucination_output = gr.Label(label="Hallucination Evaluation")
|
| 599 |
+
text_button.click(process_and_query, inputs=[input_language, audio_input, image_input, text_input], outputs=[text_output, hallucination_output])
|
| 600 |
|
| 601 |
clear_button = gr.Button("Clear")
|
| 602 |
# Link the clear function to the clear button
|
| 603 |
+
clear_button.click(clear, inputs=[input_language, audio_input, image_input, text_input], outputs=[input_language, audio_input, image_input, text_input, voice_accordion, picture_accordion, multimend_accordion])
|
|
|
|
| 604 |
|
| 605 |
return iface
|
| 606 |
|