william4416 commited on
Commit
cd3f4b6
1 Parent(s): 6be8519

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -53,9 +53,12 @@ def generate_response(user_input):
53
 
54
  # Function to interactively retrieve user input
55
  def get_user_input():
56
- # Print prompt and retrieve user input
57
- print("You: ", end="")
58
- return input()
 
 
 
59
 
60
  # Main function to interact with the user
61
  def main():
 
53
 
54
  # Function to interactively retrieve user input
55
  def get_user_input():
56
+ try:
57
+ # Print prompt and retrieve user input
58
+ print("You: ", end="")
59
+ return input()
60
+ except EOFError:
61
+ return "exit"
62
 
63
  # Main function to interact with the user
64
  def main():