Spaces:
Runtime error
Runtime error
aakashch0179
commited on
Commit
•
a6fe570
1
Parent(s):
a24834f
Update app.py
Browse files
app.py
CHANGED
@@ -68,22 +68,17 @@ if st.button("Generate"):
|
|
68 |
with st.spinner("Generating images..."):
|
69 |
images = pipe(prompt, guidance_scale=guidance_scale, num_inference_steps=64).images
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
pil_images = []
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
pil_images.append(resized_image)
|
86 |
-
|
87 |
-
gif_path = export_to_gif(pil_images, "shark_3d.gif")
|
88 |
-
st.image(pil_images[0])
|
89 |
-
st.success("GIF saved as shark_3d.gif")
|
|
|
68 |
with st.spinner("Generating images..."):
|
69 |
images = pipe(prompt, guidance_scale=guidance_scale, num_inference_steps=64).images
|
70 |
|
71 |
+
# Process images for PIL conversion (This will be customized)
|
72 |
+
pil_images = []
|
73 |
+
for image in images:
|
74 |
+
processed_image = process_image_for_pil(image)
|
75 |
+
pil_images.append(processed_image)
|
76 |
+
|
77 |
+
# Resize Images (Optional)
|
78 |
+
if should_resize(): # Add a function to control if resizing is needed
|
79 |
+
for i in range(len(pil_images)):
|
80 |
+
pil_images[i] = pil_images[i].resize((256, 256))
|
81 |
+
|
82 |
+
gif_path = export_to_gif(pil_images, "shark_3d.gif")
|
83 |
+
st.image(pil_images[0])
|
84 |
+
st.success("GIF saved as shark_3d.gif")
|
|
|
|
|
|
|
|
|
|