Spaces:
Running on CPU Upgrade

pngwn HF staff commited on
Commit
a0b409f
1 Parent(s): b610311

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -111,11 +111,10 @@ def infer(
111
 
112
  for prediction in json_data["predictions"]:
113
  for image in prediction["images"]:
114
- image_b64 = (f"data:image/jpeg;base64,{image}")
115
- images.append(image_b64)
116
 
117
  if profile is not None: # avoid conversion on non-logged-in users
118
- pil_image = Image.open(BytesIO(base64.b64decode(image)))
119
  user_history.save_image( # save images + metadata to user history
120
  label=prompt,
121
  image=pil_image,
 
111
 
112
  for prediction in json_data["predictions"]:
113
  for image in prediction["images"]:
114
+ pil_image = Image.open(BytesIO(base64.b64decode(image)))
115
+ images.append(pil_image)
116
 
117
  if profile is not None: # avoid conversion on non-logged-in users
 
118
  user_history.save_image( # save images + metadata to user history
119
  label=prompt,
120
  image=pil_image,