Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def superimpose(image_with_text, overlay_image):
|
|
| 23 |
#background = image_with_text #Image.open("/content/out2.png").convert("RGBA")
|
| 24 |
overlay_image = overlay_image.convert("RGBA")
|
| 25 |
# Paste overlay on the background
|
| 26 |
-
image_with_text.paste(overlay_image, (0, 0),
|
| 27 |
|
| 28 |
# Display or save the final image
|
| 29 |
#background.show()
|
|
@@ -111,7 +111,7 @@ def add_text_to_image(
|
|
| 111 |
|
| 112 |
# Create the Gradio interface
|
| 113 |
def create_interface():
|
| 114 |
-
with gr.Blocks(title="Text on Image Editor",
|
| 115 |
gr.Markdown("# Add Text to Image")
|
| 116 |
gr.Markdown("Upload an image and customize text properties to add text overlay.")
|
| 117 |
|
|
|
|
| 23 |
#background = image_with_text #Image.open("/content/out2.png").convert("RGBA")
|
| 24 |
overlay_image = overlay_image.convert("RGBA")
|
| 25 |
# Paste overlay on the background
|
| 26 |
+
image_with_text.paste(overlay_image, (0, 0), overlay_image)
|
| 27 |
|
| 28 |
# Display or save the final image
|
| 29 |
#background.show()
|
|
|
|
| 111 |
|
| 112 |
# Create the Gradio interface
|
| 113 |
def create_interface():
|
| 114 |
+
with gr.Blocks(title="Text on Image Editor",) as app:
|
| 115 |
gr.Markdown("# Add Text to Image")
|
| 116 |
gr.Markdown("Upload an image and customize text properties to add text overlay.")
|
| 117 |
|