Bey007 commited on
Commit
50e8b0c
·
verified ·
1 Parent(s): 3d867ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -43,7 +43,9 @@ if user_input:
43
  bot_response = conversational_bot(user_input, max_length=150)[0]['generated_text']
44
  st.write(f"Bot Response: {bot_response}") # Debugging line
45
  except Exception as e:
 
46
  st.write(f"Error generating bot response: {e}") # Error handling
 
47
 
48
  # Display response
49
  st.text_area("Bot's Response:", bot_response, height=150)
 
43
  bot_response = conversational_bot(user_input, max_length=150)[0]['generated_text']
44
  st.write(f"Bot Response: {bot_response}") # Debugging line
45
  except Exception as e:
46
+ bot_response = "I'm really sorry you're feeling this way. It must be difficult. Let's talk about it."
47
  st.write(f"Error generating bot response: {e}") # Error handling
48
+ st.write("Using fallback response.")
49
 
50
  # Display response
51
  st.text_area("Bot's Response:", bot_response, height=150)