RamAnanth1 commited on
Commit
c7443d0
·
1 Parent(s): f5e55a8

Modify error message if no response

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -15,14 +15,15 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
15
 
16
  def get_response_from_chatbot(text):
17
  try:
18
- api = ChatGPT(session_token)
19
- resp = api.send_message(text)
20
- api.refresh_auth()
21
- api.reset_conversation()
22
- response = resp['message']
 
23
  # logger.info(f"response_: {response}")
24
  except:
25
- response = "Sorry, I'm tired."
26
  return response
27
 
28
  def chat(message, chat_history):
 
15
 
16
  def get_response_from_chatbot(text):
17
  try:
18
+ print("Testing indentation")
19
+ api = ChatGPT(session_token)
20
+ resp = api.send_message(text)
21
+ api.refresh_auth()
22
+ api.reset_conversation()
23
+ response = resp['message']
24
  # logger.info(f"response_: {response}")
25
  except:
26
+ response = "Sorry, I'm tired. Please try again in some time"
27
  return response
28
 
29
  def chat(message, chat_history):