Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -235,7 +235,10 @@ def upload_file(file):
|
|
235 |
return {"choices":show_available('audios'),"__type__": "update","value":filename}
|
236 |
|
237 |
def refresh():
|
238 |
-
return {"choices":show_available("audios"),"__type__": "update"}
|
|
|
|
|
|
|
239 |
|
240 |
def update_audio_player(choice):
|
241 |
return os.path.join("audios",choice)
|
@@ -278,7 +281,7 @@ with gr.Blocks(theme="ParityError/Interstellar") as app:
|
|
278 |
index_picker = gr.Dropdown(label="Index:",interactive=True,choices=show_available('logs'),value=show_available('logs'),allow_custom_value=True)
|
279 |
model_picker.change(fn=load_model,inputs=[model_picker,index_picker],outputs=[index_picker])
|
280 |
model_refresher = gr.Button("Refresh")
|
281 |
-
model_refresher.click(fn=
|
282 |
with gr.TabItem("(Or download a model here)"):
|
283 |
with gr.Row():
|
284 |
url = gr.Textbox(label="Paste the URL here:",value="",placeholder="(i.e. https://huggingface.co/repo/model/resolve/main/model.zip)")
|
|
|
235 |
return {"choices":show_available('audios'),"__type__": "update","value":filename}
|
236 |
|
237 |
def refresh():
|
238 |
+
return {"choices":show_available("audios"),"__type__": "update"}
|
239 |
+
|
240 |
+
def refreshm():
|
241 |
+
return {"choices":show_available("assets/weights",".pth"),"__type__": "update"},{"choices":show_available("logs"),"__type__": "update"}
|
242 |
|
243 |
def update_audio_player(choice):
|
244 |
return os.path.join("audios",choice)
|
|
|
281 |
index_picker = gr.Dropdown(label="Index:",interactive=True,choices=show_available('logs'),value=show_available('logs'),allow_custom_value=True)
|
282 |
model_picker.change(fn=load_model,inputs=[model_picker,index_picker],outputs=[index_picker])
|
283 |
model_refresher = gr.Button("Refresh")
|
284 |
+
model_refresher.click(fn=refreshm,inputs=[],outputs=[model_picker,index_picker])
|
285 |
with gr.TabItem("(Or download a model here)"):
|
286 |
with gr.Row():
|
287 |
url = gr.Textbox(label="Paste the URL here:",value="",placeholder="(i.e. https://huggingface.co/repo/model/resolve/main/model.zip)")
|