Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
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():
|