iShare commited on
Commit
2af65fc
·
1 Parent(s): 02c5bf5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -11
main.py CHANGED
@@ -148,17 +148,8 @@ async def pdf_file_qa_process(username: str, request: Request, file_to_process:
148
  final_ai_response = final_ai_response.partition('<|end|>')[0].strip().replace('\n\n', '\n').replace('<|end|>', '').replace('<|user|>', '').replace('<|system|>', '').replace('<|assistant|>', '')
149
  new_final_ai_response = final_ai_response.split('Unhelpful Answer:')[0].strip()
150
  new_final_ai_response = new_final_ai_response.split('Note:')[0].strip()
151
- new_final_ai_response = new_final_ai_response.split('Please provide feedback on how to improve the chatbot.')[0].strip()
152
-
153
- api_call_msg={"INFO": f"File '{file_saved_in_api}' saved to your profile."}
154
- print(api_call_msg)
155
-
156
- print(api_call_msg["INFO"])
157
- print()
158
- print(api_call_msg["INFO"].replace("uploaded_file", uploaded_file.filename))
159
-
160
- print("API call finished...")
161
-
162
  #return {"INFO": f"File '{uploaded_file.filename}' saved to your profile."}
163
  #return api_call_msg
164
  #return {"AIResponse": new_final_ai_response}
 
148
  final_ai_response = final_ai_response.partition('<|end|>')[0].strip().replace('\n\n', '\n').replace('<|end|>', '').replace('<|user|>', '').replace('<|system|>', '').replace('<|assistant|>', '')
149
  new_final_ai_response = final_ai_response.split('Unhelpful Answer:')[0].strip()
150
  new_final_ai_response = new_final_ai_response.split('Note:')[0].strip()
151
+ new_final_ai_response = new_final_ai_response.split('Please provide feedback on how to improve the chatbot.')[0].strip()
152
+ print(new_final_ai_response)
 
 
 
 
 
 
 
 
 
153
  #return {"INFO": f"File '{uploaded_file.filename}' saved to your profile."}
154
  #return api_call_msg
155
  #return {"AIResponse": new_final_ai_response}