Update app.py
Browse files
app.py
CHANGED
@@ -427,7 +427,7 @@ def google_translate(q: str, from_: Optional[str] = 'auto', to: str = "en"):
|
|
427 |
target_language=to,
|
428 |
timeout=10
|
429 |
)
|
430 |
-
result = translator.translate(
|
431 |
return JSONResponse(content=jsonable_encoder({"detected_language": from_ , "original": q , "translated": result}))
|
432 |
except Exception as e:
|
433 |
raise HTTPException(status_code=500, detail=f"Error during translation: {e}")
|
|
|
427 |
target_language=to,
|
428 |
timeout=10
|
429 |
)
|
430 |
+
result = translator.translate(q)
|
431 |
return JSONResponse(content=jsonable_encoder({"detected_language": from_ , "original": q , "translated": result}))
|
432 |
except Exception as e:
|
433 |
raise HTTPException(status_code=500, detail=f"Error during translation: {e}")
|