TejAndrewsACC commited on
Commit
c4c71a9
·
verified ·
1 Parent(s): cf1be5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -27,14 +27,18 @@ while True:
27
  f"User Input: {user_input}"
28
  )
29
 
30
- # Get the AI's response
31
- result = client.predict(
32
- message=modified_input,
33
- api_name="/chat"
34
- )
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”
 
 
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