DrishtiSharma commited on
Commit
2d81ba2
1 Parent(s): b694350

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -5,8 +5,6 @@ from transformers import pipeline
5
  info = get_article()
6
 
7
 
8
-
9
-
10
  #model_name2id = {"Model A": "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD", "Model B": "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"}
11
 
12
  def classify_sentiment(audio):
@@ -25,18 +23,10 @@ Link to Processed MESD dataset: [Please Click Here](https://huggingface.co/datas
25
 
26
  Note: The Audio examples provided for testing this app were randomly picked from the test dataset.
27
  """
28
- #gr.Interface(
29
- #fn = classify_sentiment,
30
- #inputs = input_audio,
31
- #outputs = label,
32
- #examples=[["basta_neutral.wav"], ["detras_disgust.wav"], ["mortal_sadness.wav"], ["respiracion_happiness.wav"], ["robo_fear.wav"]],
33
- #title = "🔊 Audio Sentiment Classifier",
34
- #description = "Demostración de Gradio para la clasificación de sentimientos de audios usando Wav2Vec2",
35
- #theme="huggingface").launch()
36
-
37
- article = "a"
38
  # generate and launch interface
39
- interface = gr.Interface(fn=classify_sentiment, inputs=input_audio, outputs=label, examples=[["basta_neutral.wav"], ["detras_disgust.wav"], ["mortal_sadness.wav"], ["respiracion_happiness.wav"], ["robo_fear.wav"]], article=article, css=info['css'], theme='huggingface', title=info['title'], allow_flagging='never', description=description)
40
  interface.launch()
41
 
42
- #info['description'] info['article']
 
5
  info = get_article()
6
 
7
 
 
 
8
  #model_name2id = {"Model A": "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD", "Model B": "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"}
9
 
10
  def classify_sentiment(audio):
 
23
 
24
  Note: The Audio examples provided for testing this app were randomly picked from the test dataset.
25
  """
26
+
27
+
 
 
 
 
 
 
 
 
28
  # generate and launch interface
29
+ interface = gr.Interface(fn=classify_sentiment, inputs=input_audio, outputs=label, examples=[["basta_neutral.wav"], ["detras_disgust.wav"], ["mortal_sadness.wav"], ["respiracion_happiness.wav"], ["robo_fear.wav"]], article=info['article'], css=info['css'], theme='huggingface', title=info['title'], allow_flagging='never', description=description)
30
  interface.launch()
31
 
32
+ #info['description']