AlGe's picture
Update app.py
9e056d6 verified
raw
history blame
1.02 kB
from gradio_client import Client
import gradio as gr
# Create a client for the other space
client = Client("radames/Enhance-This-HiDiffusion-SDXL")
# Define your interface function
def my_interface(input_image, prompt="This is a beautiful scenery", negative_prompt="blurry, ugly, duplicate, poorly drawn, deformed, mosaic", seed=1415926535897932, guidance_scale=8.5, scale=2, controlnet_conditioning_scale=0.5, strength=1.0, controlnet_start=0.0, controlnet_end=1.0, guassian_sigma=2.0, intensity_threshold=3):
# Call the other space's predict function
result = client.predict(input_image, prompt, negative_prompt, seed, guidance_scale, scale, controlnet_conditioning_scale, strength, controlnet_start, controlnet_end, guassian_sigma, intensity_threshold)
return result
# Define your Gradio interface
iface = gr.Interface(fn=my_interface,
inputs=gr.Image(shape=(1024,1024), source="upload"),
outputs=gr.Image())
# Launch your Gradio interface
iface.launch()