vijay399 commited on
Commit
46f9c87
·
1 Parent(s): d120873

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -4,10 +4,8 @@ import src.translate.Translate as Translate
4
  import nltk
5
  nltk.download('punkt')
6
 
7
-
8
  app = FastAPI(docs_url="/")
9
 
10
-
11
  @app.get("/")
12
  def index():
13
  return {"output": "HELLO!!!"}
@@ -17,8 +15,8 @@ def paraphrase(text: str):
17
  resultValue, exception = Paraphrase.paraphraseParaphraseMethod(text)
18
  return {"request": text, "result": resultValue, "exception": exception}
19
 
20
-
21
  @app.get("/translate")
22
- def paraphrase(text: str):
23
  resultValue, exception = Translate.paraphraseTranslateMethod(text)
24
- return {"request": text, "result": resultValue, "exception": exception}
 
 
4
  import nltk
5
  nltk.download('punkt')
6
 
 
7
  app = FastAPI(docs_url="/")
8
 
 
9
  @app.get("/")
10
  def index():
11
  return {"output": "HELLO!!!"}
 
15
  resultValue, exception = Paraphrase.paraphraseParaphraseMethod(text)
16
  return {"request": text, "result": resultValue, "exception": exception}
17
 
 
18
  @app.get("/translate")
19
+ def translate(text: str):
20
  resultValue, exception = Translate.paraphraseTranslateMethod(text)
21
+ return {"request": text, "result": resultValue, "exception": exception}
22
+