Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio_client import Client | |
# Initialize the client | |
client = Client("radames/Enhance-This-HiDiffusion-SDXL") | |
def enhance_image(image, prompt): | |
# Use the client to predict the result | |
result = client.predict(image, prompt, api_name="/predict") | |
return result | |
# Create the Gradio interface | |
iface = gr.Interface( | |
fn=enhance_image, | |
inputs=[ | |
gr.inputs.Image(type="pil", label="Input Image"), | |
gr.inputs.Textbox(lines=2, placeholder="Enter prompt here", label="Prompt") | |
], | |
outputs=gr.outputs.Image(type="pil", label="Enhanced Image"), | |
title="Image Enhancement with Text Prompt", | |
description="Upload an image and provide a text prompt to enhance the image using HiDiffusion SDXL." | |
) | |
# Launch the interface | |
iface.launch() | |