Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def on_token_change(token):
|
|
16 |
if model_names:
|
17 |
model_names.append("Other")
|
18 |
|
19 |
-
return gr.update(visible=bool(model_names)), gr.update(choices=model_names, value=model_names[0] if model_names else None), gr.update(value=error_str(error))
|
20 |
|
21 |
def url_to_model_id(model_id_str):
|
22 |
return model_id_str.split("/")[-2] + "/" + model_id_str.split("/")[-1] if model_id_str.startswith("https://huggingface.co/") else model_id_str
|
@@ -116,7 +116,7 @@ with gr.Blocks() as demo:
|
|
116 |
visible=False,
|
117 |
)
|
118 |
|
119 |
-
btn_get_ckpts = gr.Button("Load")
|
120 |
|
121 |
with gr.Column(scale=10):
|
122 |
with gr.Column(visible=False) as group_convert:
|
@@ -130,7 +130,7 @@ with gr.Blocks() as demo:
|
|
130 |
input_token.change(
|
131 |
fn=on_token_change,
|
132 |
inputs=input_token,
|
133 |
-
outputs=[group_model, radio_model_names, error_output],
|
134 |
queue=False,
|
135 |
scroll_to_output=True)
|
136 |
|
|
|
16 |
if model_names:
|
17 |
model_names.append("Other")
|
18 |
|
19 |
+
return gr.update(visible=bool(model_names)), gr.update(choices=model_names, value=model_names[0] if model_names else None), gr.update(visible=bool(model_names)), gr.update(value=error_str(error))
|
20 |
|
21 |
def url_to_model_id(model_id_str):
|
22 |
return model_id_str.split("/")[-2] + "/" + model_id_str.split("/")[-1] if model_id_str.startswith("https://huggingface.co/") else model_id_str
|
|
|
116 |
visible=False,
|
117 |
)
|
118 |
|
119 |
+
btn_get_ckpts = gr.Button("Load", visible=False)
|
120 |
|
121 |
with gr.Column(scale=10):
|
122 |
with gr.Column(visible=False) as group_convert:
|
|
|
130 |
input_token.change(
|
131 |
fn=on_token_change,
|
132 |
inputs=input_token,
|
133 |
+
outputs=[group_model, radio_model_names, btn_get_ckpts, error_output],
|
134 |
queue=False,
|
135 |
scroll_to_output=True)
|
136 |
|