Spaces:
Sleeping
Sleeping
File size: 413 Bytes
2dbca95 06c9b54 2dbca95 06c9b54 6275c42 06c9b54 6275c42 06c9b54 6275c42 06c9b54 6275c42 06c9b54 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
from gradio_client import Client
client = Client("hysts/SDXL")
def text_to_image(client, prompt):
img = client.predict(prompt, "", "", "", api_name="/run")
return img
with gr.Blocks() as demo:
image = gr.Image()
prompt = gr.Textbox(max_lines=1)
prompt.submit(text_to_image, [client, prompt], [image])
demo.launch()
# demo = gr.load("spaces/hysts/SDXL")
# demo.launch() |