Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -304,7 +304,7 @@ def emotion_aware_tts_pipeline(input_text=None, file_input=None):
|
|
304 |
with open(file_input.name, 'r') as file:
|
305 |
input_text = file.read()
|
306 |
|
307 |
-
|
308 |
# Detect emotion
|
309 |
emotion_data = emotion_classifier(input_text)[0]
|
310 |
emotion = emotion_data['label']
|
|
|
304 |
with open(file_input.name, 'r') as file:
|
305 |
input_text = file.read()
|
306 |
|
307 |
+
if input_text:
|
308 |
# Detect emotion
|
309 |
emotion_data = emotion_classifier(input_text)[0]
|
310 |
emotion = emotion_data['label']
|