Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,18 @@ while True:
|
|
27 |
f"User Input: {user_input}"
|
28 |
)
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
|
|
|
|
27 |
f"User Input: {user_input}"
|
28 |
)
|
29 |
|
30 |
+
try:
|
31 |
+
# Get the AI's response
|
32 |
+
result = client.predict(
|
33 |
+
message=modified_input,
|
34 |
+
api_name="/chat"
|
35 |
+
)
|
36 |
+
# Print the result
|
37 |
+
print(f"Z3ta: {result}")
|
38 |
+
|
39 |
+
# Update the context with the latest conversation
|
40 |
+
context += f"User: {user_input}\nAI: {result}\n"
|
41 |
|
42 |
+
except Exception as e:
|
43 |
+
print(f"Error: {e}")
|
44 |
+
break
|