Spaces:
Runtime error
Runtime error
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() | |