DrishtiSharma commited on
Commit
3326022
1 Parent(s): 0e5871d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,12 +8,12 @@ def classify_sentiment(audio):
8
  return sentiment_classifier
9
 
10
 
11
- input_audio = gr.inputs.Audio(source="microphone", type="filepath", optional=True, label="Please record your voice")
12
  label = gr.outputs.Label(num_top_classes=5)
13
 
14
  gr.Interface(
15
  fn = classify_sentiment,
16
  inputs = input_audio,
17
  outputs = label,
18
- examples=[["images/cheetah1.jpg"], ["images/lion.jpg"]],
19
  theme="grass").launch()
 
8
  return sentiment_classifier
9
 
10
 
11
+ input_audio = [gr.inputs.Audio(source="microphone", type="filepath", label="Record/ Drop audio"), gr.inputs.Dropdown(["DrishtiSharma/wav2vec2-base-finetuned-sentiment-mesd-v11", "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"], label="Model Name")]
12
  label = gr.outputs.Label(num_top_classes=5)
13
 
14
  gr.Interface(
15
  fn = classify_sentiment,
16
  inputs = input_audio,
17
  outputs = label,
18
+ examples=[["test1.wav", "DrishtiSharma/wav2vec2-base-finetuned-sentiment-mesd-v11"], ["test2.wav", "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"]],
19
  theme="grass").launch()