| import gradio as gr | |
| import os | |
| from convert_repo_to_safetensors_sdxl_lora_gr import convert_repo_to_safetensors_sdxl_lora_multi | |
| css = """""" | |
| with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo: | |
| with gr.Column(): | |
| repo_id = gr.Textbox(label="Repo ID", placeholder="author/model", value="", lines=1) | |
| run_button = gr.Button(value="Convert") | |
| st_file = gr.Files(label="Output", interactive=False) | |
| gr.on( | |
| triggers=[repo_id.submit, run_button.click], | |
| fn=convert_repo_to_safetensors_sdxl_lora_multi, | |
| inputs=[repo_id, st_file], | |
| outputs=[st_file], | |
| ) | |
| demo.queue() | |
| demo.launch() | |