Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -994,16 +994,15 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 994 |
)
|
| 995 |
|
| 996 |
|
| 997 |
-
responseee = completion.choices
|
| 998 |
if completion.choices[0].finish_reason == "stop":
|
| 999 |
reply = completion.choices[0].message['content']
|
| 1000 |
print("RESPONSE TRY (NO IMAGE)", completion, reply)
|
| 1001 |
elif completion.choices[0].finish_reason == "function_call":
|
| 1002 |
reply = completion.choices[0].message['content']
|
| 1003 |
print("RESPONSE TRY (NO IMAGE) FUNCTION_CALL", completion, reply)
|
| 1004 |
-
except:
|
|
|
|
| 1005 |
reply = "Maximum messages: 15. Please clear your history and Try Again! (No Image)"
|
| 1006 |
-
print(responseee)
|
| 1007 |
output.append({"Mode": "Chat", "content": reply})
|
| 1008 |
|
| 1009 |
return output
|
|
|
|
| 994 |
)
|
| 995 |
|
| 996 |
|
|
|
|
| 997 |
if completion.choices[0].finish_reason == "stop":
|
| 998 |
reply = completion.choices[0].message['content']
|
| 999 |
print("RESPONSE TRY (NO IMAGE)", completion, reply)
|
| 1000 |
elif completion.choices[0].finish_reason == "function_call":
|
| 1001 |
reply = completion.choices[0].message['content']
|
| 1002 |
print("RESPONSE TRY (NO IMAGE) FUNCTION_CALL", completion, reply)
|
| 1003 |
+
except Exception as e:
|
| 1004 |
+
print("Error",e)
|
| 1005 |
reply = "Maximum messages: 15. Please clear your history and Try Again! (No Image)"
|
|
|
|
| 1006 |
output.append({"Mode": "Chat", "content": reply})
|
| 1007 |
|
| 1008 |
return output
|