Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,9 +69,9 @@ def diacritize_text_api(text_to_diacritize):
|
|
| 69 |
api_name="/predict"
|
| 70 |
)
|
| 71 |
# Ensure result is a string, handle potential None or unexpected types
|
| 72 |
-
|
| 73 |
# Return the result for both the output textbox and the state
|
| 74 |
-
return
|
| 75 |
except Exception as e:
|
| 76 |
print(f"Error during diacritization API call: {e}")
|
| 77 |
return f"Error during diacritization: {e}", ""
|
|
|
|
| 69 |
api_name="/predict"
|
| 70 |
)
|
| 71 |
# Ensure result is a string, handle potential None or unexpected types
|
| 72 |
+
result_str = str(result) if result is not None else "Error: Empty response from diacritization service."
|
| 73 |
# Return the result for both the output textbox and the state
|
| 74 |
+
return result_str, result_str
|
| 75 |
except Exception as e:
|
| 76 |
print(f"Error during diacritization API call: {e}")
|
| 77 |
return f"Error during diacritization: {e}", ""
|