Spaces:
Paused
Paused
Update Apollo/inference.py
Browse files- Apollo/inference.py +2 -0
Apollo/inference.py
CHANGED
|
@@ -10,6 +10,7 @@ from ml_collections import ConfigDict
|
|
| 10 |
import json
|
| 11 |
import time
|
| 12 |
import warnings
|
|
|
|
| 13 |
warnings.filterwarnings("ignore")
|
| 14 |
|
| 15 |
def get_config(config_path):
|
|
@@ -124,6 +125,7 @@ def main(input_wav, output_wav, ckpt_path):
|
|
| 124 |
del model
|
| 125 |
torch.cuda.empty_cache()
|
| 126 |
|
|
|
|
| 127 |
if __name__ == "__main__":
|
| 128 |
parser = argparse.ArgumentParser(description="Audio Inference Script")
|
| 129 |
parser.add_argument("--in_wav", type=str, required=True, help="Path to input wav file")
|
|
|
|
| 10 |
import json
|
| 11 |
import time
|
| 12 |
import warnings
|
| 13 |
+
import spaces
|
| 14 |
warnings.filterwarnings("ignore")
|
| 15 |
|
| 16 |
def get_config(config_path):
|
|
|
|
| 125 |
del model
|
| 126 |
torch.cuda.empty_cache()
|
| 127 |
|
| 128 |
+
@spaces.GPU
|
| 129 |
if __name__ == "__main__":
|
| 130 |
parser = argparse.ArgumentParser(description="Audio Inference Script")
|
| 131 |
parser.add_argument("--in_wav", type=str, required=True, help="Path to input wav file")
|