Spaces:
Running
on
Zero
Running
on
Zero
secure get_tts_message func
Browse files
app.py
CHANGED
@@ -117,10 +117,12 @@ def get_tts_message(intent_result):
|
|
117 |
Determine the TTS message based on the classification result.
|
118 |
Reservation intent returns one message; all others, another.
|
119 |
"""
|
120 |
-
if "訂位意圖" in intent_result and "無" not in intent_result:
|
121 |
return "稍後您將會從簡訊收到訂位連結"
|
122 |
-
|
123 |
return "我們將會將您的回饋傳達給負責人,謝謝您"
|
|
|
|
|
124 |
|
125 |
def play_tts_message(message, voice='af_heart'):
|
126 |
"""
|
|
|
117 |
Determine the TTS message based on the classification result.
|
118 |
Reservation intent returns one message; all others, another.
|
119 |
"""
|
120 |
+
if intent_result and "訂位意圖" in intent_result and "無" not in intent_result:
|
121 |
return "稍後您將會從簡訊收到訂位連結"
|
122 |
+
elif intent_result:
|
123 |
return "我們將會將您的回饋傳達給負責人,謝謝您"
|
124 |
+
else:
|
125 |
+
return "未能判斷意圖"
|
126 |
|
127 |
def play_tts_message(message, voice='af_heart'):
|
128 |
"""
|