Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
# Load the ZenCtrl tool pipeline for image enhancement | |
enhancer = pipeline(model="fotographerai/zenctrl_tools") | |
def enhance_image(input_image): | |
# Enhance the image using the model | |
enhanced_image = enhancer(input_image) | |
return enhanced_image | |
# Set up the Gradio interface | |
interface = gr.Interface( | |
fn=enhance_image, | |
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() | |