File size: 763 Bytes
d636540
0b8ddfd
d636540
0b8ddfd
 
d636540
0b8ddfd
d636540
0b8ddfd
d636540
 
 
 
0b8ddfd
d636540
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from diffusion_single_file import load_model, enhance_image

# Load the ZenCtrl model using the correct library
model = load_model("fotographerai/zenctrl_tools")

def enhance_image_fn(input_image):
    # Enhance the image using the model
    enhanced_image = enhance_image(model, input_image)
    return enhanced_image

# Set up the Gradio interface
interface = gr.Interface(
    fn=enhance_image_fn,
    inputs=gr.Image(type="pil", label="Upload Image to Enhance"),
    outputs=gr.Image(type="pil", label="Enhanced Image"),
    title="Image Enhancement with ZenCtrl",
    description="Upload an image to enhance it using FotographerAI's ZenCtrl tools. Enhance your photos with AI!",
    live=True
)

# Launch the interface
interface.launch()