TiberiuCristianLeon commited on
Commit
184e6ec
·
verified ·
1 Parent(s): c832cd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,12 +14,12 @@ def index():
14
  return {'endpoints': ['/paraphrase', '/translate'], 'mtmodels': MTMODELS}
15
 
16
  @app.get("/paraphrase")
17
- def paraphrase(text: str, model: str, operation_id="get_paraphrase"):
18
  resultValue, exception = Paraphrase.paraphraseParaphraseMethod(text, model)
19
  return {"input": text, "translation": resultValue, "exception": exception}
20
 
21
  @app.get("/translate")
22
- def translate(text: str, model: Optional[str] = MTMODELS['gemma'], operation_id="get_translate"):
23
  # resultValue, exception = Translate.paraphraseTranslateMethod(text, model)
24
  resultValue = Translate.gemma_direct(text, model)
25
  return {"input": text, "result": resultValue, "model": model}
 
14
  return {'endpoints': ['/paraphrase', '/translate'], 'mtmodels': MTMODELS}
15
 
16
  @app.get("/paraphrase")
17
+ def paraphrase(text: str, model: str, operation_id="get_paraphrase", description="Paraphrase text"):
18
  resultValue, exception = Paraphrase.paraphraseParaphraseMethod(text, model)
19
  return {"input": text, "translation": resultValue, "exception": exception}
20
 
21
  @app.get("/translate")
22
+ def translate(text: str, model: Optional[str] = MTMODELS['gemma'], operation_id="get_translate", description="Translate text"):
23
  # resultValue, exception = Translate.paraphraseTranslateMethod(text, model)
24
  resultValue = Translate.gemma_direct(text, model)
25
  return {"input": text, "result": resultValue, "model": model}