yusir4200 commited on
Commit
8bfacde
·
verified ·
1 Parent(s): 886cd76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -53,17 +53,12 @@ def query_medgemma(image_path, question):
53
  encoded_image = f"data:image/png;base64,{encoded_image}"
54
 
55
 
56
- payload = {
57
- "inputs": [
58
- {
59
- "role": "user",
60
- "content": [
61
- {"type": "image", "image": encoded_image},
62
- {"type": "text", "text": question}
63
- ]
64
- }
65
- ]
66
  }
 
67
 
68
  response = requests.post(API_URL, headers=HEADERS, json=payload)
69
  if response.ok:
 
53
  encoded_image = f"data:image/png;base64,{encoded_image}"
54
 
55
 
56
+ payload = {
57
+ "inputs": {
58
+ "image": encoded_image,
59
+ "question": question
 
 
 
 
 
 
60
  }
61
+ }
62
 
63
  response = requests.post(API_URL, headers=HEADERS, json=payload)
64
  if response.ok: