DrishtiSharma commited on
Commit
1e4b89a
1 Parent(s): 8f07d61

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_harassment_detection(input_file):
42
  return harassment_detection
43
 
44
 
 
 
 
 
 
45
  description = """ This is a Gradio demo for Spanish audio transcription-based harassment detection. To use this, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and classified as Harassment/non-harassment pertaining to audio (transcription) with the help of pre-trained models.
46
 
47
 
@@ -52,11 +57,10 @@ Pre-trained model used for Harassment Detection: [hackathon-pln-es/Detect-Acoso-
52
 
53
  gr.Interface(
54
  asr_and_harassment_detection,
55
- inputs=[gr.inputs.Audio(source="microphone", type="filepath", label="Record your audio")],
56
- outputs=[gr.outputs.Textbox(label="Predicción")],
57
- #outputs=[gr.outputs.Label(num_top_classes=2),gr.outputs.Label(num_top_classes=2), gr.outputs.Label(num_top_classes=2)],,
58
- examples=[["audio2.wav"], ["sample_audio.wav"], ["test1.wav"], ["test2.wav"]],
59
- title="Spanish-Audio-Transcription-based-Harassment-Detection",
60
  description=description,
61
  layout="horizontal",
62
  theme="huggingface",
 
42
  return harassment_detection
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=[["audio2.wav"], ["sample_audio.wav"], ["test1.wav"], ["test2.wav"]]
48
+ title="Spanish-Audio-Transcription-based-Harassment-Detection"
49
+
50
  description = """ This is a Gradio demo for Spanish audio transcription-based harassment detection. To use this, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and classified as Harassment/non-harassment pertaining to audio (transcription) with the help of pre-trained models.
51
 
52
 
 
57
 
58
  gr.Interface(
59
  asr_and_harassment_detection,
60
+ inputs=inputs,
61
+ outputs=outputs,
62
+ examples=examples,
63
+ title=title,
 
64
  description=description,
65
  layout="horizontal",
66
  theme="huggingface",