Niral Patel
commited on
Commit
·
fd60f59
1
Parent(s):
e7556b1
change in model config
Browse files- config.json +4 -0
- spleeter_model/config.json +0 -0
- test.py +11 -4
config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"stems": 2,
|
3 |
+
"model_type": "spleeter"
|
4 |
+
}
|
spleeter_model/config.json
DELETED
Binary file (30 Bytes)
|
|
test.py
CHANGED
@@ -12,8 +12,15 @@
|
|
12 |
|
13 |
# print(model)
|
14 |
|
15 |
-
from transformers import
|
|
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# print(model)
|
14 |
|
15 |
+
from transformers import AutoConfig, AutoModel
|
16 |
+
from custom_model import SpleeterModel
|
17 |
|
18 |
+
# Load configuration and model
|
19 |
+
config = AutoConfig.from_pretrained("<your-username>/<model-repo>")
|
20 |
+
model = SpleeterModel(config)
|
21 |
+
|
22 |
+
# Process an audio file
|
23 |
+
# result = model.forward("example.wav")
|
24 |
+
|
25 |
+
# Output separated stems
|
26 |
+
print(model)
|