Spaces:
Runtime error
Runtime error
added examples
Browse filesFiles changed (2)
- app.py+3-1
- sick person.jpegAdded
456 unmodified lines4574584594604614624634644654664674681 unmodified line470471472473474475476456 unmodified linesimage_input = gr.Image(label="upload image")image_output = gr.Markdown(label="output text")image_button = gr.Button("process image")with gr.Tab("speech to text"):input_language = gr.Dropdown(languages, label="select the language",value="English",interactive=True)audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")audio_output = gr.Markdown(label="output text")audio_button = gr.Button("process audio")audio_button.click(process_speech, inputs=[input_language,audio_input], outputs=audio_output)with gr.Tab("hallucination check"):assertion = gr.Textbox(label="assertion")citation = gr.Textbox(label="citation text")1 unmodified lineaudio_button = gr.Button("check hallucination")gr.Examples([["i am drunk","sarah is pregnant"]],inputs=[assertion,citation])text_button.click(process_and_query, inputs=text_input, outputs=text_output)image_button.click(process_image, inputs=image_input, outputs=image_output)audio_button.click(check_hallucination,inputs=[assertion,citation],outputs=hullucination_output)456 unmodified lines4574584594604614624634644654664674684694704711 unmodified line473474475476477478456 unmodified linesimage_input = gr.Image(label="upload image")image_output = gr.Markdown(label="output text")image_button = gr.Button("process image")image_button.click(process_image, inputs=image_input, outputs=image_output)gr.Examples(["sick person.jpeg"],inputs=[image_input])with gr.Tab("speech to text"):input_language = gr.Dropdown(languages, label="select the language",value="English",interactive=True)audio_input = gr.Audio(label="speak",type="filepath",sources="microphone")audio_output = gr.Markdown(label="output text")audio_button = gr.Button("process audio")audio_button.click(process_speech, inputs=[input_language,audio_input], outputs=audio_output)gr.Examples([["English","sample_input.mp3"]],inputs=[input_language,audio_input])with gr.Tab("hallucination check"):assertion = gr.Textbox(label="assertion")citation = gr.Textbox(label="citation text")1 unmodified lineaudio_button = gr.Button("check hallucination")gr.Examples([["i am drunk","sarah is pregnant"]],inputs=[assertion,citation])text_button.click(process_and_query, inputs=text_input, outputs=text_output)audio_button.click(check_hallucination,inputs=[assertion,citation],outputs=hullucination_output)
app.py+3-1
sick person.jpegAdded
