fffiloni commited on
Commit
4ecd653
1 Parent(s): 877236b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -208,18 +208,19 @@ class AnimateController:
208
 
209
 
210
 
211
- # Load the image
212
- img = cv2.imread('image.jpg')
213
 
214
- # Resize the image to (64, 64)
215
- img = cv2.resize(img, (64, 64))
216
 
217
- # Save the flattened image as a JPEG file
218
- cv2.imwrite('resized_image.jpg', img)
 
 
 
219
 
220
  sample = pipeline(
221
  prompt_textbox,
222
- init_image = "resized_image.jpg",
223
  negative_prompt = negative_prompt_textbox,
224
  num_inference_steps = 25,
225
  guidance_scale = 8.,
 
208
 
209
 
210
 
211
+ # Open the image
212
+ image = Image.open(init_image).convert("RGBA")
213
 
 
 
214
 
215
+ # Resize the image
216
+ image.resize((512, 512))
217
+
218
+ # Save the resized image to the specified output path
219
+ image.save("resized.jpg")
220
 
221
  sample = pipeline(
222
  prompt_textbox,
223
+ init_image = "resized.jpg",
224
  negative_prompt = negative_prompt_textbox,
225
  num_inference_steps = 25,
226
  guidance_scale = 8.,