Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,7 @@ def classify_toxicity(audio_file, text_input, classify_anxiety, emo_class, expli
|
|
157 |
return classify_anxiety
|
158 |
def intervention_output(intervene):
|
159 |
if intervene== "Audio File":
|
160 |
-
gr.
|
161 |
elif intervene == "Therapy App":
|
162 |
out_img : gr.update(visible=True, value="hrv-breathing.gif")
|
163 |
elif intervene == "Text Message":
|
@@ -193,6 +193,7 @@ with gr.Blocks() as iface:
|
|
193 |
out_class = gr.Textbox()
|
194 |
out_text = gr.Textbox(visible=False)
|
195 |
out_img = gr.Textbox(visible=False)
|
|
|
196 |
submit_btn.click(fn=classify_toxicity, inputs=[aud_input, text, anxiety_class, emo_class, explit_preference, sense_slider, intervention_type], outputs=[out_val, out_class, out_text])
|
197 |
|
198 |
iface.launch()
|
|
|
157 |
return classify_anxiety
|
158 |
def intervention_output(intervene):
|
159 |
if intervene== "Audio File":
|
160 |
+
out_aud : gr.update(visible=True, autoplay=True)
|
161 |
elif intervene == "Therapy App":
|
162 |
out_img : gr.update(visible=True, value="hrv-breathing.gif")
|
163 |
elif intervene == "Text Message":
|
|
|
193 |
out_class = gr.Textbox()
|
194 |
out_text = gr.Textbox(visible=False)
|
195 |
out_img = gr.Textbox(visible=False)
|
196 |
+
out_aud = gr.Audio(value="calm.wav", visible=False)
|
197 |
submit_btn.click(fn=classify_toxicity, inputs=[aud_input, text, anxiety_class, emo_class, explit_preference, sense_slider, intervention_type], outputs=[out_val, out_class, out_text])
|
198 |
|
199 |
iface.launch()
|