Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,7 @@ def infer(prompt, negative="low_quality", scale=7, profile: gr.OAuthProfile | No
|
|
29 |
image_b64 = (f"data:image/jpeg;base64,{image}")
|
30 |
images.append(image_b64)
|
31 |
|
32 |
-
|
33 |
-
for image in images:
|
34 |
pil_image = Image.open(BytesIO(base64.b64decode(image)))
|
35 |
user_history.save_image( # save images + metadata to user history
|
36 |
label=prompt,
|
|
|
29 |
image_b64 = (f"data:image/jpeg;base64,{image}")
|
30 |
images.append(image_b64)
|
31 |
|
32 |
+
if profile is not None: # avoid conversion on non-logged-in users
|
|
|
33 |
pil_image = Image.open(BytesIO(base64.b64decode(image)))
|
34 |
user_history.save_image( # save images + metadata to user history
|
35 |
label=prompt,
|