Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
3881c34
1
Parent(s):
3609460
Update app.py
Browse files
app.py
CHANGED
@@ -42,14 +42,13 @@ def duplicate_horizontally(img):
|
|
42 |
new_image.paste(img, (width, 0))
|
43 |
return new_image
|
44 |
|
45 |
-
# Load the mask image
|
46 |
-
mask = Image.open("mask_square.png")
|
47 |
|
48 |
@spaces.GPU
|
49 |
def generate(image, prompt_description, prompt_user, progress=gr.Progress(track_tqdm=True)):
|
50 |
prompt_structure = "The two-panel image showcases the logo on the left and the application on the right, [LEFT] the left panel is showing "+prompt_description+" [RIGHT] this logo is applied to "
|
51 |
prompt = prompt_structure + prompt_user
|
52 |
-
|
|
|
53 |
cropped_image = square_center_crop(image)
|
54 |
logo_dupli = duplicate_horizontally(cropped_image)
|
55 |
|
|
|
42 |
new_image.paste(img, (width, 0))
|
43 |
return new_image
|
44 |
|
|
|
|
|
45 |
|
46 |
@spaces.GPU
|
47 |
def generate(image, prompt_description, prompt_user, progress=gr.Progress(track_tqdm=True)):
|
48 |
prompt_structure = "The two-panel image showcases the logo on the left and the application on the right, [LEFT] the left panel is showing "+prompt_description+" [RIGHT] this logo is applied to "
|
49 |
prompt = prompt_structure + prompt_user
|
50 |
+
|
51 |
+
mask = Image.open("mask_square.png")
|
52 |
cropped_image = square_center_crop(image)
|
53 |
logo_dupli = duplicate_horizontally(cropped_image)
|
54 |
|