darshankr commited on
Commit
5c4a549
1 Parent(s): 6a6db87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,14 +67,14 @@ def read_root():
67
 
68
  class TranslateRequest(BaseModel):
69
  sentences: List[str]
70
- src_lang
71
  target_lang: str
72
 
73
 
74
  @app.post("/translate/")
75
  def translate(request: TranslateRequest):
76
  try:
77
- result = translate_text(request.sentences, request.target_lang)
78
  return result
79
  except Exception as e:
80
  raise HTTPException(status_code=500, detail=str(e))
 
67
 
68
  class TranslateRequest(BaseModel):
69
  sentences: List[str]
70
+ src_lang: str
71
  target_lang: str
72
 
73
 
74
  @app.post("/translate/")
75
  def translate(request: TranslateRequest):
76
  try:
77
+ result = translate_text(request.sentences, request.src_lang, request.target_lang)
78
  return result
79
  except Exception as e:
80
  raise HTTPException(status_code=500, detail=str(e))