Spaces:
Sleeping
Sleeping
Fix timeout error message to match actual timeout
Browse files
llm_clients/qwen_translator.py
CHANGED
|
@@ -417,8 +417,9 @@ class QwenTranslatorClient(LlmClient):
|
|
| 417 |
print(f" ✅ Translation completed ({len(translated_text)} chars): '{translated_text[:200]}...'", flush=True)
|
| 418 |
|
| 419 |
except subprocess.TimeoutExpired:
|
| 420 |
-
error_msg = "Translation timed out after
|
| 421 |
-
print(f" ❌ {error_msg}")
|
|
|
|
| 422 |
raise RuntimeError(error_msg)
|
| 423 |
except subprocess.CalledProcessError as e:
|
| 424 |
error_output = e.stderr if e.stderr else e.stdout
|
|
|
|
| 417 |
print(f" ✅ Translation completed ({len(translated_text)} chars): '{translated_text[:200]}...'", flush=True)
|
| 418 |
|
| 419 |
except subprocess.TimeoutExpired:
|
| 420 |
+
error_msg = "Translation timed out after 30 seconds"
|
| 421 |
+
print(f" ❌ {error_msg}", flush=True)
|
| 422 |
+
print(f" This may indicate the model is too slow. Consider using a smaller model or enabling GPU.", flush=True)
|
| 423 |
raise RuntimeError(error_msg)
|
| 424 |
except subprocess.CalledProcessError as e:
|
| 425 |
error_output = e.stderr if e.stderr else e.stdout
|