Update app.py
Browse files
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 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
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:
|