Stardragon2099 commited on
Commit
1896a77
·
1 Parent(s): fcf926a

ported to chatgpt api

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,11 +75,11 @@ def predict(img, prompt):
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"Image (base64): {image_bytes}"}
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