Spaces:
Build error
Build error
Commit ·
1896a77
1
Parent(s): fcf926a
ported to chatgpt api
Browse files
app.py
CHANGED
|
@@ -75,11 +75,11 @@ def predict(img, prompt):
|
|
| 75 |
purpose='vision'
|
| 76 |
)
|
| 77 |
|
| 78 |
-
|
| 79 |
file_id = upload_response['id']
|
| 80 |
messages = [
|
| 81 |
{"role": "system", "content": prompt + "respond with JSON only"},
|
| 82 |
-
{"role": "user", "content": f"
|
| 83 |
]
|
| 84 |
|
| 85 |
# Make API call
|
|
|
|
| 75 |
purpose='vision'
|
| 76 |
)
|
| 77 |
|
| 78 |
+
# Get the file ID from the upload response
|
| 79 |
file_id = upload_response['id']
|
| 80 |
messages = [
|
| 81 |
{"role": "system", "content": prompt + "respond with JSON only"},
|
| 82 |
+
{"role": "user", "content": f"File ID: {file_id}"}
|
| 83 |
]
|
| 84 |
|
| 85 |
# Make API call
|