Update app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,9 @@ def analyze_image(uploaded_file):
|
|
160 |
|
161 |
try:
|
162 |
# bytes_data = uploaded_file.getvalue()
|
163 |
-
|
|
|
|
|
164 |
|
165 |
#output = post_model_outputs_response.outputs[0].data.image.base64
|
166 |
#image = Image.open(BytesIO(output))
|
|
|
160 |
|
161 |
try:
|
162 |
# bytes_data = uploaded_file.getvalue()
|
163 |
+
buffer = BytesIO()
|
164 |
+
uploaded_file.save(buffer, format='PNG')
|
165 |
+
bytes_data = buffer.getvalue()
|
166 |
|
167 |
#output = post_model_outputs_response.outputs[0].data.image.base64
|
168 |
#image = Image.open(BytesIO(output))
|