Asiya057 commited on
Commit
54f200e
1 Parent(s): c3a903b

update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -9
main.py CHANGED
@@ -143,18 +143,18 @@ qa = ConvoRetrievalChain.from_llm(
143
  class Question(BaseModel):
144
  question: str
145
 
146
- # @app.get("/chat/")
147
- # def chat_with(str1: str):
148
- # resp = qa({"question": str1})
149
- # answer = resp.get('answer', '')
150
- # return {'message': answer}
151
 
152
 
153
- @app.get("/")
154
 
155
- def chat_with(str1):
156
- resp = qa({"question": str1})
157
- return {'message':resp}
158
 
159
 
160
 
 
143
  class Question(BaseModel):
144
  question: str
145
 
146
+ @app.get("/chat/")
147
+ def chat_with(str1: str):
148
+ resp = qa({"question": str1})
149
+ answer = resp.get('answer', '')
150
+ return {'message': answer}
151
 
152
 
153
+ # @app.get("/")
154
 
155
+ # def chat_with(str1):
156
+ # resp = qa({"question": str1})
157
+ # return {'message':resp}
158
 
159
 
160