DrishtiSharma commited on
Commit
eba9818
1 Parent(s): 3180a1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -4,6 +4,15 @@ from transformers import pipeline
4
 
5
  info = get_article()
6
 
 
 
 
 
 
 
 
 
 
7
  #Model_1 = "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD"
8
  #Model_2 ="hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"
9
 
@@ -19,22 +28,6 @@ label = gr.outputs.Label(num_top_classes=5)
19
 
20
  ################### Gradio Web APP ################################
21
 
22
- #title = "Audio Sentiment Classifier"
23
-
24
- description = """
25
- <p>
26
- <center>
27
- This application classifies the sentiment of the audio input provided by the user.
28
- #</center>
29
- #</p>
30
- #<center>
31
- #<img src="https://huggingface.co/spaces/hackathon-pln-es/Audio-Sentiment-Classifier/tree/main/sentiment.jpg" alt="logo" width="750"/>
32
- #<img src="https://huggingface.co/spaces/hackathon-pln-es/Audio-Sentiment-Classifier/tree/main/sentiment.jpg" style="max-width: 100%; max-height: 10%; height: 250px; object-fit: fill">
33
- </center>
34
- """
35
-
36
-
37
-
38
 
39
  #gr.Interface(
40
  #fn = classify_sentiment,
@@ -46,5 +39,5 @@ This application classifies the sentiment of the audio input provided by the use
46
  #theme="huggingface").launch()
47
 
48
  # generate and launch interface
49
- 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=info['description'])
50
  interface.launch()
 
4
 
5
  info = get_article()
6
 
7
+ article='''
8
+ # Team members
9
+ - Drishti Sharma [(DrishtiSharma)](https://huggingface.co/DrishtiSharma)
10
+ - Manuel Fernandez Moya [(Mnauel)](https://huggingface.co/Mnauel)
11
+ - Antonio Alberto Soto Hernández [(Asotoh)](https://huggingface.co/Asotoh)
12
+ -
13
+ -
14
+ '''
15
+
16
  #Model_1 = "hackathon-pln-es/wav2vec2-base-finetuned-sentiment-classification-MESD"
17
  #Model_2 ="hackathon-pln-es/wav2vec2-base-finetuned-sentiment-mesd"
18
 
 
28
 
29
  ################### Gradio Web APP ################################
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  #gr.Interface(
33
  #fn = classify_sentiment,
 
39
  #theme="huggingface").launch()
40
 
41
  # generate and launch interface
42
+ 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=info['description'])
43
  interface.launch()