Spaces:
Runtime error
Runtime error
File size: 756 Bytes
5f87521 ef7e565 5f87521 2eaf831 5f87521 2eaf831 5f87521 2eaf831 51524a2 2eaf831 5f87521 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# 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() |