mskov commited on
Commit
3e45c8c
1 Parent(s): 3e064a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -159,8 +159,8 @@ with gr.Blocks() as iface:
159
  anxiety_class = gr.Radio(["racism", "LGBTQ+ hate", "sexually explicit", "misophonia"])
160
  explit_preference = gr.Radio(choices=["N-Word", "B-Word", "All Explitives"], label="Words to omit from general anxiety classes", info="certain words may be acceptible within certain contects for given groups of people, and some people may be unbothered by explitives broadly speaking.")
161
  emo_class = gr.Radio(choices=["negaitve emotionality"], label="label", info="Select if you would like explitives to be considered anxiety-indiucing in the case of anger/ negative emotionality.")
162
- sense_slider = gr.Slider(minimum=1, maximum=5, step=1.0, label="How readily do you want the tool to intervene? 1 = in extreme cases and 5 = at every opportunity")
163
  intervention_type = gr.Dropdown(choices=["Therapy App", "Audio File", "Text Message"])
 
164
  with gr.Column():
165
  aud_input = gr.Audio(source="upload", type="filepath", label="Upload Audio File")
166
  text = gr.Textbox(label="Enter Text", placeholder="Enter text here...")
@@ -169,6 +169,6 @@ with gr.Blocks() as iface:
169
  out_val = gr.Textbox()
170
  out_class = gr.Textbox()
171
  out_text = gr.Textbox()
172
- submit_btn.click(fn=classify_toxicity, inputs=[aud_input, text, anxiety_class, emo_class, explit_preference, sense_slider], outputs=[out_val, out_class, out_text, intervention_type])
173
 
174
  iface.launch()
 
159
  anxiety_class = gr.Radio(["racism", "LGBTQ+ hate", "sexually explicit", "misophonia"])
160
  explit_preference = gr.Radio(choices=["N-Word", "B-Word", "All Explitives"], label="Words to omit from general anxiety classes", info="certain words may be acceptible within certain contects for given groups of people, and some people may be unbothered by explitives broadly speaking.")
161
  emo_class = gr.Radio(choices=["negaitve emotionality"], label="label", info="Select if you would like explitives to be considered anxiety-indiucing in the case of anger/ negative emotionality.")
 
162
  intervention_type = gr.Dropdown(choices=["Therapy App", "Audio File", "Text Message"])
163
+ sense_slider = gr.Slider(minimum=1, maximum=5, step=1.0, label="How readily do you want the tool to intervene? 1 = in extreme cases and 5 = at every opportunity")
164
  with gr.Column():
165
  aud_input = gr.Audio(source="upload", type="filepath", label="Upload Audio File")
166
  text = gr.Textbox(label="Enter Text", placeholder="Enter text here...")
 
169
  out_val = gr.Textbox()
170
  out_class = gr.Textbox()
171
  out_text = gr.Textbox()
172
+ 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])
173
 
174
  iface.launch()