Vishaltiwari2019 commited on
Commit
622dc35
·
verified ·
1 Parent(s): 9a57be1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def get_sentiment(text):
30
  # Replace the following line with your desired text-to-speech model and parameters.
31
  speech_output = f"This is a text with sentiment score {sentiment_score}: {text}"
32
 
33
- return speech_output
34
 
35
  tts_demo = gr.Interface(
36
  fn=get_sentiment,
@@ -43,4 +43,4 @@ tts_demo = gr.Interface(
43
 
44
  demo = gr.TabbedInterface([tts_demo], ["Text to speech with sentiment"])
45
  if __name__ == "__main__":
46
- demo.launch()
 
30
  # Replace the following line with your desired text-to-speech model and parameters.
31
  speech_output = f"This is a text with sentiment score {sentiment_score}: {text}"
32
 
33
+ return {"audio": speech_output}
34
 
35
  tts_demo = gr.Interface(
36
  fn=get_sentiment,
 
43
 
44
  demo = gr.TabbedInterface([tts_demo], ["Text to speech with sentiment"])
45
  if __name__ == "__main__":
46
+ demo.launch()