thechaiexperiment commited on
Commit
ae14a90
·
verified ·
1 Parent(s): 88b83da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
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 Response(answer=answer)
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