LalitMahale
commited on
Commit
·
62da4bb
1
Parent(s):
fea0903
modified
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ async def home():
|
|
48 |
def verify_token(token: str):
|
49 |
print("token: ",token)
|
50 |
if token != os.getenv("TOKEN"):
|
51 |
-
raise HTTPException(status_code=401, detail="Token not matched")
|
52 |
|
53 |
# Translate endpoint that accepts a query parameter 'text'
|
54 |
# @app.get("/translate")
|
@@ -71,6 +71,7 @@ async def chatbot(req:ChatBot):
|
|
71 |
raise HTTPException(status_code=400, detail="No text provided")
|
72 |
verify_token(token=token)
|
73 |
res = Response().chatbot(query=query)
|
|
|
74 |
return {"result":res}
|
75 |
|
76 |
# @app.get("/chatbot")
|
|
|
48 |
def verify_token(token: str):
|
49 |
print("token: ",token)
|
50 |
if token != os.getenv("TOKEN"):
|
51 |
+
raise HTTPException(status_code=401, detail="Token not matched")
|
52 |
|
53 |
# Translate endpoint that accepts a query parameter 'text'
|
54 |
# @app.get("/translate")
|
|
|
71 |
raise HTTPException(status_code=400, detail="No text provided")
|
72 |
verify_token(token=token)
|
73 |
res = Response().chatbot(query=query)
|
74 |
+
print("Chatbot resp :- ", res)
|
75 |
return {"result":res}
|
76 |
|
77 |
# @app.get("/chatbot")
|