Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -600,7 +600,6 @@ def add_song_cover_text(img,artist,song,height,width):
|
|
600 |
|
601 |
return img
|
602 |
|
603 |
-
@spaces.GPU(duration=300)
|
604 |
def all_pipes(pos,neg,artist,song):
|
605 |
|
606 |
imgs = pipe_generate_image(pos,neg)
|
@@ -610,6 +609,7 @@ def all_pipes(pos,neg,artist,song):
|
|
610 |
|
611 |
return imgs
|
612 |
|
|
|
613 |
def handle_generation(artist,song,genre,lyrics):
|
614 |
|
615 |
log(f'CALL handle_generate')
|
@@ -639,7 +639,7 @@ def handle_generation(artist,song,genre,lyrics):
|
|
639 |
index = 1
|
640 |
names = []
|
641 |
for img in imgs:
|
642 |
-
scaled_by =
|
643 |
labeled_img = add_song_cover_text(img,artist,song,height*scaled_by,width*scaled_by)
|
644 |
name = f'{artist} - {song} ({index}).png'
|
645 |
labeled_img.save(name)
|
|
|
600 |
|
601 |
return img
|
602 |
|
|
|
603 |
def all_pipes(pos,neg,artist,song):
|
604 |
|
605 |
imgs = pipe_generate_image(pos,neg)
|
|
|
609 |
|
610 |
return imgs
|
611 |
|
612 |
+
@spaces.GPU(duration=300)
|
613 |
def handle_generation(artist,song,genre,lyrics):
|
614 |
|
615 |
log(f'CALL handle_generate')
|
|
|
639 |
index = 1
|
640 |
names = []
|
641 |
for img in imgs:
|
642 |
+
scaled_by = 4
|
643 |
labeled_img = add_song_cover_text(img,artist,song,height*scaled_by,width*scaled_by)
|
644 |
name = f'{artist} - {song} ({index}).png'
|
645 |
labeled_img.save(name)
|