Spaces:
Paused
Paused
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from rvc_infer import download_online_model
|
| 3 |
+
|
| 4 |
+
def download_model(url, dir_name):
|
| 5 |
+
output_models = download_online_model(url, dir_name)
|
| 6 |
+
return output_models
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
with gr.Blocks() as demo:
|
| 11 |
+
with gr.Tab("inferenece"):
|
| 12 |
+
gr.Markdown("in progress")
|
| 13 |
+
with gr.Tab("Download model"):
|
| 14 |
+
gr.Markdown("## Download Model for infernece")
|
| 15 |
+
url_input = gr.Textbox(label="Model URL", placeholder="Enter the URL of the model")
|
| 16 |
+
dir_name_input = gr.Textbox(label="Directory Name", placeholder="Enter the directory name")
|
| 17 |
+
|
| 18 |
+
output = gr.Textbox(label="Output Models")
|
| 19 |
+
|
| 20 |
+
download_button = gr.Button("Download Model")
|
| 21 |
+
|
| 22 |
+
download_button.click(download_model, inputs=[url_input, dir_name_input], outputs=output)
|
| 23 |
+
|
| 24 |
+
demo.launch()
|