Upload model
Browse files- modeling_test.py +2 -2
modeling_test.py
CHANGED
|
@@ -24,10 +24,10 @@ class TestModel(PreTrainedModel):
|
|
| 24 |
repo_id = self.path,
|
| 25 |
filename = "output1.wav",
|
| 26 |
repo_type = "model",
|
| 27 |
-
|
| 28 |
)
|
| 29 |
arr, sr = librosa.load(audio_path)
|
| 30 |
-
return librosa.get_duration(arr, sr)
|
| 31 |
|
| 32 |
def forward(self, tensor):
|
| 33 |
return self.model1(tensor)
|
|
|
|
| 24 |
repo_id = self.path,
|
| 25 |
filename = "output1.wav",
|
| 26 |
repo_type = "model",
|
| 27 |
+
local_dir = os.path.dirname(os.path.abspath(__file__))
|
| 28 |
)
|
| 29 |
arr, sr = librosa.load(audio_path)
|
| 30 |
+
return librosa.get_duration(y=arr, sr=sr)
|
| 31 |
|
| 32 |
def forward(self, tensor):
|
| 33 |
return self.model1(tensor)
|