Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -400,14 +400,15 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
400 |
|
401 |
if max_rounded_prediction > 0.5:
|
402 |
print("\nWays to dispose of this waste: " + max_label)
|
403 |
-
messages.append({"role": "user", "content": content + " " + max_label})
|
|
|
404 |
|
405 |
print("IMAGE messages after appending:", messages)
|
406 |
|
407 |
header = {
|
408 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
|
409 |
"Content-Type": "application/json",
|
410 |
-
"Authorization": "Bearer
|
411 |
}
|
412 |
|
413 |
try:
|
|
|
400 |
|
401 |
if max_rounded_prediction > 0.5:
|
402 |
print("\nWays to dispose of this waste: " + max_label)
|
403 |
+
# messages.append({"role": "user", "content": content + " " + max_label})
|
404 |
+
messages.append({"role": "user", "content": max_label})
|
405 |
|
406 |
print("IMAGE messages after appending:", messages)
|
407 |
|
408 |
header = {
|
409 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36",
|
410 |
"Content-Type": "application/json",
|
411 |
+
"Authorization": f"Bearer {auth}"
|
412 |
}
|
413 |
|
414 |
try:
|