Spaces:
Sleeping
Sleeping
File size: 965 Bytes
8fdc208 ba33199 6f02f5d cfdaab7 d238dbe 30cfbea cfdaab7 6f02f5d 804ed50 30cfbea 6f02f5d 804ed50 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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',
@gr.render(inputs=s, triggers=[s.input])
def render(value):
#texts = []
for Mode in value:
with gr.Tab(label=Mode):
if value=='Text-to-Image':
#gr.Markdown(value=Mode)
demo_t2i = 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)
demo_t2i = gr.load('stabilityai/stable-diffusion-xl-refiner-1.0', src='models') #.launch(height=1000, quiet=True)
demo.launch(debug=True, quiet=True) |