Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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()
|