Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -407,12 +407,18 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
407 |
"Authorization": f"Bearer {auth}"
|
408 |
}
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
|
418 |
reply = response["choices"][0]["message"]["content"]
|
|
|
407 |
"Authorization": f"Bearer {auth}"
|
408 |
}
|
409 |
|
410 |
+
try:
|
411 |
+
response = requests.post(host, headers=headers, json={
|
412 |
+
"messages": messages,
|
413 |
+
"model": model_llm
|
414 |
+
}).json()
|
415 |
+
print("RESPONSE TRY",response.content)
|
416 |
+
except:
|
417 |
+
response = requests.post(host, headers=headers, json={
|
418 |
+
"messages": messages,
|
419 |
+
"model": model_llm
|
420 |
+
})
|
421 |
+
print("RESPONSE EXCEPT",response.content)
|
422 |
|
423 |
|
424 |
reply = response["choices"][0]["message"]["content"]
|