eaglelandsonce commited on
Commit
8af2d8d
1 Parent(s): 40d3e3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -160,7 +160,9 @@ def analyze_image(uploaded_file):
160
 
161
  try:
162
  # bytes_data = uploaded_file.getvalue()
163
- bytes_data = BytesIO(uploaded_file)
 
 
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))