Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -603,7 +603,9 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
603 |
"model": model_llm
|
604 |
}).json()
|
605 |
print("RESPONSE TRY", response)
|
606 |
-
reply = response["choices"][0]["message"]["content"]
|
|
|
|
|
607 |
output.append({"Mode": "Image", "type": max_label, "prediction_value": max_rounded_prediction, "content": reply})
|
608 |
except:
|
609 |
print("DOESN'T WORK")
|
@@ -645,7 +647,8 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
645 |
"model": model_llm
|
646 |
}).json()
|
647 |
|
648 |
-
reply = response["choices"][0]["message"]["content"]
|
|
|
649 |
except:
|
650 |
reply = "Maximum messages: 15. Please clear your history and Try Again!"
|
651 |
output.append({"Mode": "Chat", "content": reply})
|
|
|
603 |
"model": model_llm
|
604 |
}).json()
|
605 |
print("RESPONSE TRY", response)
|
606 |
+
# reply = response["choices"][0]["message"]["content"]
|
607 |
+
reply = response.choices[0].message['content']
|
608 |
+
|
609 |
output.append({"Mode": "Image", "type": max_label, "prediction_value": max_rounded_prediction, "content": reply})
|
610 |
except:
|
611 |
print("DOESN'T WORK")
|
|
|
647 |
"model": model_llm
|
648 |
}).json()
|
649 |
|
650 |
+
# reply = response["choices"][0]["message"]["content"]
|
651 |
+
reply = response.choices[0].message['content']
|
652 |
except:
|
653 |
reply = "Maximum messages: 15. Please clear your history and Try Again!"
|
654 |
output.append({"Mode": "Chat", "content": reply})
|