Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -578,10 +578,8 @@ async def chat_endpoint(chat_query: ChatQuery):
|
|
| 578 |
# Translate back to Arabic if needed
|
| 579 |
if language_code == 0:
|
| 580 |
answer = translate_en_to_ar(answer)
|
| 581 |
-
if not answer:
|
| 582 |
-
return Response(answer="", error="Translation failed")
|
| 583 |
|
| 584 |
-
return
|
| 585 |
except Exception as e:
|
| 586 |
raise HTTPException(status_code=500, detail=str(e))
|
| 587 |
|
|
|
|
| 578 |
# Translate back to Arabic if needed
|
| 579 |
if language_code == 0:
|
| 580 |
answer = translate_en_to_ar(answer)
|
|
|
|
|
|
|
| 581 |
|
| 582 |
+
return answer
|
| 583 |
except Exception as e:
|
| 584 |
raise HTTPException(status_code=500, detail=str(e))
|
| 585 |
|