Spaces:
Sleeping
Sleeping
wony617
commited on
Commit
·
ce8a422
1
Parent(s):
36e29b8
Fix handler function return value
Browse files- agent/handler.py +2 -3
agent/handler.py
CHANGED
|
@@ -119,7 +119,7 @@ def update_dropdown_choices(file_list):
|
|
| 119 |
def start_translation_process():
|
| 120 |
"""Start the translation process for the first file"""
|
| 121 |
if not state.files_to_translate:
|
| 122 |
-
return "❌ No files available for translation."
|
| 123 |
|
| 124 |
current_file = state.files_to_translate[0]
|
| 125 |
|
|
@@ -163,8 +163,7 @@ def start_translation_process():
|
|
| 163 |
except Exception as e:
|
| 164 |
response = f"❌ Translation failed: {str(e)}"
|
| 165 |
response += "\n**➡️ Please try from the beginning.**"
|
| 166 |
-
|
| 167 |
-
return response
|
| 168 |
|
| 169 |
|
| 170 |
def handle_general_message(message):
|
|
|
|
| 119 |
def start_translation_process():
|
| 120 |
"""Start the translation process for the first file"""
|
| 121 |
if not state.files_to_translate:
|
| 122 |
+
return "❌ No files available for translation.", ""
|
| 123 |
|
| 124 |
current_file = state.files_to_translate[0]
|
| 125 |
|
|
|
|
| 163 |
except Exception as e:
|
| 164 |
response = f"❌ Translation failed: {str(e)}"
|
| 165 |
response += "\n**➡️ Please try from the beginning.**"
|
| 166 |
+
return response, ""
|
|
|
|
| 167 |
|
| 168 |
|
| 169 |
def handle_general_message(message):
|