Spaces:
Running
on
Zero
Running
on
Zero
Serhiy Stetskovych
commited on
Commit
•
701d19a
1
Parent(s):
a161d55
Add universal model and updated texts.
Browse files- app.py +8 -4
- configs/config_apollo_uni.yaml +5 -0
- weights/apollo_model_uni.ckpt +3 -0
app.py
CHANGED
@@ -40,28 +40,32 @@ def _getWindowingArray(window_size, fade_size):
|
|
40 |
|
41 |
|
42 |
description = f'''
|
43 |
-
|
44 |
'''
|
45 |
|
46 |
|
47 |
apollo_config = get_config('configs/apollo.yaml')
|
48 |
apollo_vocal2_config = get_config('configs/config_apollo_vocal.yaml')
|
|
|
49 |
apollo_model = look2hear.models.BaseModel.from_pretrain('weights/apollo.bin', **apollo_config['model']).to(device)
|
50 |
apollo_vocal = look2hear.models.BaseModel.from_pretrain('weights/apollo_vocal.bin', **apollo_config['model']).to(device)
|
51 |
apollo_vocal2 = look2hear.models.BaseModel.from_pretrain('weights/apollo_vocal2.bin', **apollo_vocal2_config['model']).to(device)
|
|
|
52 |
|
53 |
|
54 |
|
55 |
models = {
|
56 |
'apollo': apollo_model,
|
57 |
'apollo_vocal': apollo_vocal,
|
58 |
-
'apollo_vocal2': apollo_vocal2
|
|
|
59 |
}
|
60 |
|
61 |
choices = [
|
62 |
('MP3 restore', 'apollo'),
|
63 |
('Apollo vocal', 'apollo_vocal'),
|
64 |
-
('Apollo vocal2', 'apollo_vocal2')
|
|
|
65 |
]
|
66 |
|
67 |
@spaces.GPU
|
@@ -151,7 +155,7 @@ if __name__ == "__main__":
|
|
151 |
],
|
152 |
allow_flagging ='never',
|
153 |
cache_examples=False,
|
154 |
-
title='
|
155 |
|
156 |
)
|
157 |
i.queue(max_size=20, default_concurrency_limit=4)
|
|
|
40 |
|
41 |
|
42 |
description = f'''
|
43 |
+
This is unofficial space for audio restoration model Apollo: https://github.com/JusperLee/Apollo
|
44 |
'''
|
45 |
|
46 |
|
47 |
apollo_config = get_config('configs/apollo.yaml')
|
48 |
apollo_vocal2_config = get_config('configs/config_apollo_vocal.yaml')
|
49 |
+
apollo_uni_config = get_config('configs/config_apollo_uni.yaml')
|
50 |
apollo_model = look2hear.models.BaseModel.from_pretrain('weights/apollo.bin', **apollo_config['model']).to(device)
|
51 |
apollo_vocal = look2hear.models.BaseModel.from_pretrain('weights/apollo_vocal.bin', **apollo_config['model']).to(device)
|
52 |
apollo_vocal2 = look2hear.models.BaseModel.from_pretrain('weights/apollo_vocal2.bin', **apollo_vocal2_config['model']).to(device)
|
53 |
+
apollo_uni = look2hear.models.BaseModel.from_pretrain('weights/apollo_model_uni.ckpt', **apollo_uni_config['model']).to(device)
|
54 |
|
55 |
|
56 |
|
57 |
models = {
|
58 |
'apollo': apollo_model,
|
59 |
'apollo_vocal': apollo_vocal,
|
60 |
+
'apollo_vocal2': apollo_vocal2,
|
61 |
+
'apollo_uni': apollo_uni
|
62 |
}
|
63 |
|
64 |
choices = [
|
65 |
('MP3 restore', 'apollo'),
|
66 |
('Apollo vocal', 'apollo_vocal'),
|
67 |
+
('Apollo vocal2', 'apollo_vocal2'),
|
68 |
+
('Apollo universal', 'apollo_uni')
|
69 |
]
|
70 |
|
71 |
@spaces.GPU
|
|
|
155 |
],
|
156 |
allow_flagging ='never',
|
157 |
cache_examples=False,
|
158 |
+
title='Apollo audio restoration',
|
159 |
|
160 |
)
|
161 |
i.queue(max_size=20, default_concurrency_limit=4)
|
configs/config_apollo_uni.yaml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
model:
|
2 |
+
sr: 44100
|
3 |
+
win: 20
|
4 |
+
feature_dim: 384
|
5 |
+
layer: 6
|
weights/apollo_model_uni.ckpt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:11433256eca90143d32f1108d156ac756fd0201fbc69e5f736def4062fb52186
|
3 |
+
size 146867952
|