Spaces:
Runtime error
Runtime error
added examples
Browse files- app.py +3 -1
- sick person.jpeg +0 -0
app.py
CHANGED
@@ -457,12 +457,15 @@ with gr.Blocks(theme='ParityError/Anime') as iface :
|
|
457 |
image_input = gr.Image(label="upload image")
|
458 |
image_output = gr.Markdown(label="output text")
|
459 |
image_button = gr.Button("process image")
|
|
|
|
|
460 |
with gr.Tab("speech to text"):
|
461 |
input_language = gr.Dropdown(languages, label="select the language",value="English",interactive=True)
|
462 |
audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")
|
463 |
audio_output = gr.Markdown(label="output text")
|
464 |
audio_button = gr.Button("process audio")
|
465 |
audio_button.click(process_speech, inputs=[input_language,audio_input], outputs=audio_output)
|
|
|
466 |
with gr.Tab("hallucination check"):
|
467 |
assertion = gr.Textbox(label="assertion")
|
468 |
citation = gr.Textbox(label="citation text")
|
@@ -470,7 +473,6 @@ with gr.Blocks(theme='ParityError/Anime') as iface :
|
|
470 |
audio_button = gr.Button("check hallucination")
|
471 |
gr.Examples([["i am drunk","sarah is pregnant"]],inputs=[assertion,citation])
|
472 |
text_button.click(process_and_query, inputs=text_input, outputs=text_output)
|
473 |
-
image_button.click(process_image, inputs=image_input, outputs=image_output)
|
474 |
audio_button.click(check_hallucination,inputs=[assertion,citation],outputs=hullucination_output)
|
475 |
|
476 |
|
|
|
457 |
image_input = gr.Image(label="upload image")
|
458 |
image_output = gr.Markdown(label="output text")
|
459 |
image_button = gr.Button("process image")
|
460 |
+
image_button.click(process_image, inputs=image_input, outputs=image_output)
|
461 |
+
gr.Examples(["sick person.jpeg"],inputs=[image_input])
|
462 |
with gr.Tab("speech to text"):
|
463 |
input_language = gr.Dropdown(languages, label="select the language",value="English",interactive=True)
|
464 |
audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")
|
465 |
audio_output = gr.Markdown(label="output text")
|
466 |
audio_button = gr.Button("process audio")
|
467 |
audio_button.click(process_speech, inputs=[input_language,audio_input], outputs=audio_output)
|
468 |
+
gr.Examples([["English","sample_input.mp3"]],inputs=[input_language,audio_input])
|
469 |
with gr.Tab("hallucination check"):
|
470 |
assertion = gr.Textbox(label="assertion")
|
471 |
citation = gr.Textbox(label="citation text")
|
|
|
473 |
audio_button = gr.Button("check hallucination")
|
474 |
gr.Examples([["i am drunk","sarah is pregnant"]],inputs=[assertion,citation])
|
475 |
text_button.click(process_and_query, inputs=text_input, outputs=text_output)
|
|
|
476 |
audio_button.click(check_hallucination,inputs=[assertion,citation],outputs=hullucination_output)
|
477 |
|
478 |
|
sick person.jpeg
ADDED