DrishtiSharma
commited on
Commit
•
60c30fb
1
Parent(s):
ef8de90
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def predict_and_ctc_lm_decode(input_file):
|
|
23 |
transcribed_text = asr(speech, chunk_length_s=5, stride_length_s=1)["text"]
|
24 |
pipe1 = pipeline("sentiment-analysis", model = "finiteautomata/beto-sentiment-analysis")
|
25 |
sentiment = pipe1(transcribed_text)[0]["label"]
|
26 |
-
return sentiment
|
27 |
|
28 |
description = """ This is a Gradio demo for Sentiment Analysis of Transcribed Spanish Audio. First, we do Speech to Text, and then we perform sentiment analysis on the obtained transcription of the input audio.
|
29 |
|
|
|
23 |
transcribed_text = asr(speech, chunk_length_s=5, stride_length_s=1)["text"]
|
24 |
pipe1 = pipeline("sentiment-analysis", model = "finiteautomata/beto-sentiment-analysis")
|
25 |
sentiment = pipe1(transcribed_text)[0]["label"]
|
26 |
+
return f"Detected Sentiment: {sentiment}"
|
27 |
|
28 |
description = """ This is a Gradio demo for Sentiment Analysis of Transcribed Spanish Audio. First, we do Speech to Text, and then we perform sentiment analysis on the obtained transcription of the input audio.
|
29 |
|