Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -784,6 +784,7 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 784 |
|
| 785 |
|
| 786 |
def vision(caption):
|
|
|
|
| 787 |
# with open("image.png", "wb") as file1_write:
|
| 788 |
# file1_write.write(image_data)
|
| 789 |
|
|
@@ -858,9 +859,9 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 858 |
|
| 859 |
response = requests.request("POST", "https://api.ohmygpt.com/v1/chat/completions", headers=headers, data=payload)
|
| 860 |
print("GGGGG:",response.content)
|
| 861 |
-
response = response.json()
|
| 862 |
-
res = response["choices"][0]["message"]["content"]
|
| 863 |
-
return
|
| 864 |
except:
|
| 865 |
return "ERRRRRRR"
|
| 866 |
else:
|
|
|
|
| 784 |
|
| 785 |
|
| 786 |
def vision(caption):
|
| 787 |
+
print("VISSS")
|
| 788 |
# with open("image.png", "wb") as file1_write:
|
| 789 |
# file1_write.write(image_data)
|
| 790 |
|
|
|
|
| 859 |
|
| 860 |
response = requests.request("POST", "https://api.ohmygpt.com/v1/chat/completions", headers=headers, data=payload)
|
| 861 |
print("GGGGG:",response.content)
|
| 862 |
+
# response = response.json()
|
| 863 |
+
# res = response["choices"][0]["message"]["content"]
|
| 864 |
+
return response.content
|
| 865 |
except:
|
| 866 |
return "ERRRRRRR"
|
| 867 |
else:
|