Spaces:
Runtime error
Runtime error
# Let's re-evaluate the implementation using the guide for making predictions with the Gradio client | |
import gradio as gr | |
from gradio.client import Client | |
# Define the function to call the existing Gradio space API using the Gradio client | |
def enhance_image(input_image): | |
client = Client("radames/Enhance-This-HiDiffusion-SDXL") | |
result = client.predict(input_image, api_name="/predict") | |
return result | |
# Create the Gradio interface | |
interface = gr.Interface( | |
fn=enhance_image, | |
inputs=gr.Image(type="pil", label="Input Image"), | |
outputs=gr.Image(type="pil", label="Enhanced Image"), | |
title="Enhance This HiDiffusion SDXL", | |
description="Upload an image to enhance it using HiDiffusion SDXL." | |
) | |
# Launch the app | |
interface.launch() |