DrishtiSharma commited on
Commit
ada522a
1 Parent(s): 523acf8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -42,6 +42,11 @@ def asr_and_sexism_detection(input_file):
42
  return "SEXIST LANGUAGE DETECTED"
43
 
44
 
 
 
 
 
 
45
  description = """ This is a Gradio demo for Spanish audio transcription-based Sexism detection. The key objective is to detect whether the sexist language is present in the audio or not. To use this app, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and classified as sexism/non-sexism pertaining to audio (transcription) with the help of pre-trained models.
46
 
47
 
@@ -59,11 +64,10 @@ Pre-trained Model used for Sexism Detection : [hackathon-pln-es/twitter_sexismo-
59
 
60
  gr.Interface(
61
  asr_and_sexism_detection,
62
- inputs=[gr.inputs.Audio(source="microphone", type="filepath", label="Record your audio")],
63
- #outputs=[gr.outputs.Label(num_top_classes=2),gr.outputs.Label(num_top_classes=2), gr.outputs.Label(num_top_classes=2)],
64
- outputs=[gr.outputs.Textbox(label="Predicción")],
65
- examples=[["audio1.wav"], ["audio2.wav"], ["audio3.wav"], ["audio4.wav"], ["sample_audio.wav"]],
66
- title="Spanish-Audio-Transcription-based-Sexism-Detection",
67
  description=description,
68
  layout="horizontal",
69
  theme="huggingface",
 
42
  return "SEXIST LANGUAGE DETECTED"
43
 
44
 
45
+ inputs=[gr.inputs.Audio(source="microphone", type="filepath", label="Record your audio")]
46
+ outputs=[gr.outputs.Textbox(label="Predicción")]
47
+ examples=[["audio1.wav"], ["audio2.wav"], ["audio3.wav"], ["audio4.wav"], ["sample_audio.wav"]]
48
+ title="Spanish Audio Transcription based Sexism Detection"
49
+
50
  description = """ This is a Gradio demo for Spanish audio transcription-based Sexism detection. The key objective is to detect whether the sexist language is present in the audio or not. To use this app, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and classified as sexism/non-sexism pertaining to audio (transcription) with the help of pre-trained models.
51
 
52
 
 
64
 
65
  gr.Interface(
66
  asr_and_sexism_detection,
67
+ inputs=inputs,
68
+ outputs=outputs,
69
+ examples=examples,
70
+ title=title,
 
71
  description=description,
72
  layout="horizontal",
73
  theme="huggingface",