Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1098,8 +1098,9 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
1098 |
if second_response is not None:
|
1099 |
reply = second_response
|
1100 |
json_res = json.dumps(reply, indent=2)
|
|
|
|
|
1101 |
print("REPLYYYYYYY OPENAI: ", reply)
|
1102 |
-
return json_res
|
1103 |
else:
|
1104 |
return "Error"
|
1105 |
else:
|
|
|
1098 |
if second_response is not None:
|
1099 |
reply = second_response
|
1100 |
json_res = json.dumps(reply, indent=2)
|
1101 |
+
data = json.loads(json_res)
|
1102 |
+
reply = data["choices"][0]["message"]["content"]
|
1103 |
print("REPLYYYYYYY OPENAI: ", reply)
|
|
|
1104 |
else:
|
1105 |
return "Error"
|
1106 |
else:
|