william4416 commited on
Commit
5179ce7
·
verified ·
1 Parent(s): 328ff93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -25,13 +25,13 @@ def generate_dialog_response(user_input):
25
 
26
  # Function to interactively retrieve user input
27
  def get_user_input():
28
- try:
29
- # Print prompt and retrieve user input
30
- return input("You: ")
31
- except EOFError:
32
- # If EOFError occurs (e.g., Ctrl+D for EOF on Unix-like systems), inform the user and prompt again
33
- print("\nBot: EOFError occurred. Please provide input.")
34
- return get_user_input()
35
 
36
  # Main function to interact with the user
37
  def main():
 
25
 
26
  # Function to interactively retrieve user input
27
  def get_user_input():
28
+ while True:
29
+ try:
30
+ # Print prompt and retrieve user input
31
+ return input("You: ")
32
+ except EOFError:
33
+ # If EOFError occurs (e.g., Ctrl+D for EOF on Unix-like systems), inform the user and prompt again
34
+ print("\nBot: EOFError occurred. Please provide input.")
35
 
36
  # Main function to interact with the user
37
  def main():