Spaces:
Build error
Build error
| import gradio as gr | |
| def predict(*args): | |
| print(args) | |
| return {"inputs": list[args]} | |
| with gr.Blocks() as demo: | |
| s = gr.CheckboxGroup(choices=['Text-to-Image', 'Image-to-Image'], interactive=True) #value='Text-to-Image', | |
| def render(value): | |
| #texts = [] | |
| for Mode in value: | |
| with gr.Tab(label=Mode): | |
| if value=='Text-to-Image': | |
| gr.Markdown(value=Mode) | |
| gr.load('stabilityai/stable-diffusion-xl-base-1.0', src='models') | |
| #gr.load('minimaxir/sdxl-wrong-lora', src='models') #.launch(debug=True, quiet=True) #minimaxir/sdxl-wrong-lora stabilityai/sdxl-turbo ByteDance/SDXL-Lightning | |
| else: | |
| gr.Markdown(value=Mode) | |
| gr.load('stabilityai/stable-diffusion-xl-refiner-1.0', src='models') #.launch(height=1000, quiet=True) | |
| #with gr.Row(): | |
| #for i in range(num): | |
| #texts.append(gr.Textbox()) | |
| #json = gr.JSON() | |
| #btn = gr.Button("RUN") | |
| #btn.click(fn=predict, inputs=texts, outputs=json) | |
| demo.launch(debug=False, quiet=True) |