Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image, ImageOps, ImageEnhance, ImageFilter, ImageDraw
|
3 |
-
import numpy as np
|
4 |
-
import base64
|
5 |
-
from io import BytesIO
|
6 |
import json
|
7 |
|
8 |
def edit_image(image, grayscale, flip, rotate, brightness, contrast, color, crop_data, resize, blur, sharpness, draw_text, text_position, text_color, text_size):
|
@@ -113,9 +110,11 @@ interface = gr.Interface(
|
|
113 |
live=True,
|
114 |
title="Advanced Image Editor",
|
115 |
description="Upload an image and apply various transformations including brightness, contrast, color adjustments, cropping, resizing, blurring, and adding text.",
|
116 |
-
layout="vertical",
|
117 |
-
theme="default",
|
118 |
-
css=html_content
|
119 |
)
|
120 |
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image, ImageOps, ImageEnhance, ImageFilter, ImageDraw
|
|
|
|
|
|
|
3 |
import json
|
4 |
|
5 |
def edit_image(image, grayscale, flip, rotate, brightness, contrast, color, crop_data, resize, blur, sharpness, draw_text, text_position, text_color, text_size):
|
|
|
110 |
live=True,
|
111 |
title="Advanced Image Editor",
|
112 |
description="Upload an image and apply various transformations including brightness, contrast, color adjustments, cropping, resizing, blurring, and adding text.",
|
|
|
|
|
|
|
113 |
)
|
114 |
|
115 |
+
# Adding custom HTML to the Gradio interface
|
116 |
+
with gr.Blocks() as demo:
|
117 |
+
gr.HTML(html_content)
|
118 |
+
interface.render()
|
119 |
+
|
120 |
+
demo.launch()
|