yaron123 commited on
Commit
fd72ef6
·
1 Parent(s): 8ed5555
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -595,7 +595,7 @@ def add_song_cover_text(img,artist,song,height,width):
595
  x = math.ceil((width - textwidth) / 2)
596
  y = height - (textheight * rows / 2) - (height / 2)
597
  y = math.ceil(y - (height / 2 * labels_distance))
598
- draw.text((x, y), song, (255,255,255), font=font, spacing=2, stroke_width=4, stroke_fill=(0,0,0))
599
 
600
  textheight=min(math.ceil( width / 12 ), math.ceil( height / 6 ))
601
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
@@ -603,7 +603,7 @@ def add_song_cover_text(img,artist,song,height,width):
603
  x = math.ceil((width - textwidth) / 2)
604
  y = height - (textheight * rows / 2) - (height / 2)
605
  y = math.ceil(y + (height / 2 * labels_distance))
606
- draw.text((x, y), artist, (0,0,0), font=font, spacing=4, stroke_width=2, stroke_fill=(255,255,255))
607
 
608
  return img
609
 
@@ -651,7 +651,7 @@ if __name__ == "__main__":
651
  # Song Cover Image Generator
652
  """)
653
  with gr.Row():
654
- with gr.Column(scale=2):
655
  artist = gr.Textbox(
656
  placeholder="Artist name",
657
  value="",
@@ -664,7 +664,6 @@ if __name__ == "__main__":
664
  container=False,
665
  max_lines=1
666
  )
667
- with gr.Column(scale=2):
668
  genre = gr.Textbox(
669
  placeholder="Genre (English)",
670
  value="",
 
595
  x = math.ceil((width - textwidth) / 2)
596
  y = height - (textheight * rows / 2) - (height / 2)
597
  y = math.ceil(y - (height / 2 * labels_distance))
598
+ draw.text((x, y), song, (255,255,255), font=font, spacing=2, stroke_width=6, stroke_fill=(0,0,0))
599
 
600
  textheight=min(math.ceil( width / 12 ), math.ceil( height / 6 ))
601
  font = ImageFont.truetype(r"Alef-Bold.ttf", textheight)
 
603
  x = math.ceil((width - textwidth) / 2)
604
  y = height - (textheight * rows / 2) - (height / 2)
605
  y = math.ceil(y + (height / 2 * labels_distance))
606
+ draw.text((x, y), artist, (255,255,255), font=font, spacing=4, stroke_width=6, stroke_fill=(0,0,0))
607
 
608
  return img
609
 
 
651
  # Song Cover Image Generator
652
  """)
653
  with gr.Row():
654
+ with gr.Column(scale=4):
655
  artist = gr.Textbox(
656
  placeholder="Artist name",
657
  value="",
 
664
  container=False,
665
  max_lines=1
666
  )
 
667
  genre = gr.Textbox(
668
  placeholder="Genre (English)",
669
  value="",