Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,29 +2,17 @@ import gradio as gr
|
|
2 |
import os, shutil
|
3 |
import subprocess, glob
|
4 |
from datetime import datetime
|
|
|
5 |
os.environ["rmvpe_root"] = "assets/rmvpe"
|
6 |
os.environ['index_root']="logs"
|
7 |
os.environ['weight_root']="assets/weights"
|
8 |
from infer.modules.vc.modules import VC
|
9 |
from configs.config import Config
|
10 |
import torch
|
11 |
-
import pandas as pd
|
12 |
|
13 |
config = Config()
|
14 |
vc = VC(config)
|
15 |
|
16 |
-
URL = "https://docs.google.com/spreadsheets/d/1tAUaQrEHYgRsm1Lvrnj14HFHDwJWl0Bd9x0QePewNco/edit#gid=1977693859"
|
17 |
-
csv_url = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
18 |
-
if os.path.exists("spreadsheet.csv"):
|
19 |
-
cached_data = pd.read_csv("spreadsheet.csv")
|
20 |
-
else:
|
21 |
-
cached_data = pd.read_csv(csv_url)
|
22 |
-
cached_data.to_csv("spreadsheet.csv", index=False)
|
23 |
-
models = {}
|
24 |
-
|
25 |
-
for url, filename in zip(cached_data['URL'], cached_data['Filename']):
|
26 |
-
models[filename] = url
|
27 |
-
|
28 |
def load_model(model_picker,index_picker):
|
29 |
logs = show_available("logs")
|
30 |
if model_picker.replace(".pth","") in logs:
|
|
|
2 |
import os, shutil
|
3 |
import subprocess, glob
|
4 |
from datetime import datetime
|
5 |
+
from tools.useftools import *
|
6 |
os.environ["rmvpe_root"] = "assets/rmvpe"
|
7 |
os.environ['index_root']="logs"
|
8 |
os.environ['weight_root']="assets/weights"
|
9 |
from infer.modules.vc.modules import VC
|
10 |
from configs.config import Config
|
11 |
import torch
|
|
|
12 |
|
13 |
config = Config()
|
14 |
vc = VC(config)
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
def load_model(model_picker,index_picker):
|
17 |
logs = show_available("logs")
|
18 |
if model_picker.replace(".pth","") in logs:
|