Update app_demo.py
Browse files- app_demo.py +12 -13
app_demo.py
CHANGED
@@ -178,11 +178,20 @@ def run_models(models, parallel):
|
|
178 |
return [load_model(m) for m in models]
|
179 |
#with gr.Blocks(css="style.css") as demo:
|
180 |
with gr.Blocks() as demo:
|
181 |
-
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
with gr.Column(scale=1):
|
183 |
with gr.Row():
|
184 |
hfuser_input = gr.Textbox(label="Hugging Face Username")
|
185 |
-
hfuser_models = gr.Dropdown(label="Models from User", choices=[], multiselect=True, visible=False)
|
186 |
user_model_dict = gr.Textbox(visible=False, label="Dict Input (e.g., {'username': ['model1', 'model2']})")
|
187 |
with gr.Row():
|
188 |
run_btn = gr.Button("Load Models")
|
@@ -191,17 +200,7 @@ with gr.Blocks() as demo:
|
|
191 |
parallel_toggle = gr.Checkbox(label="Load in Parallel", value=True)
|
192 |
with gr.Row():
|
193 |
output = gr.Textbox(label="Output", lines=3)
|
194 |
-
|
195 |
-
gr.HTML(
|
196 |
-
f"""
|
197 |
-
<p id="project-links" align="center">
|
198 |
-
<a href='https://huggingface.co/spaces/charliebaby2023/Fast_Stable_diffusion_CPU/edit/main/app_demo.py'>Edit this app_demo py file</a>
|
199 |
-
<p> this is currently running the Lykon/dreamshaper-xl-v2-turbo model</p>
|
200 |
-
<p><fast stable diffusion, CPU</p>
|
201 |
-
</p>
|
202 |
-
"""
|
203 |
-
)
|
204 |
-
#gr.Markdown(DESCRIPTION)
|
205 |
def update_models(hfuser):
|
206 |
if hfuser:
|
207 |
models = validate_and_list_models(hfuser)
|
|
|
178 |
return [load_model(m) for m in models]
|
179 |
#with gr.Blocks(css="style.css") as demo:
|
180 |
with gr.Blocks() as demo:
|
181 |
+
with gr.Row():
|
182 |
+
gr.HTML(
|
183 |
+
f"""
|
184 |
+
<p id="project-links" align="center">
|
185 |
+
<a href='https://huggingface.co/spaces/charliebaby2023/Fast_Stable_diffusion_CPU/edit/main/app_demo.py'>Edit this app_demo py file</a>
|
186 |
+
<p> this is currently running the Lykon/dreamshaper-xl-v2-turbo model</p>
|
187 |
+
<p><fast stable diffusion, CPU</p>
|
188 |
+
</p>
|
189 |
+
"""
|
190 |
+
)
|
191 |
with gr.Column(scale=1):
|
192 |
with gr.Row():
|
193 |
hfuser_input = gr.Textbox(label="Hugging Face Username")
|
194 |
+
hfuser_models = gr.Dropdown(label="Models from User", choices=["Choose A Model"], value="Choose A Model", multiselect=True, visible=False)
|
195 |
user_model_dict = gr.Textbox(visible=False, label="Dict Input (e.g., {'username': ['model1', 'model2']})")
|
196 |
with gr.Row():
|
197 |
run_btn = gr.Button("Load Models")
|
|
|
200 |
parallel_toggle = gr.Checkbox(label="Load in Parallel", value=True)
|
201 |
with gr.Row():
|
202 |
output = gr.Textbox(label="Output", lines=3)
|
203 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
def update_models(hfuser):
|
205 |
if hfuser:
|
206 |
models = validate_and_list_models(hfuser)
|