update
Browse files- __pycache__/api.cpython-310.pyc +0 -0
- app.py +2 -0
- requirements.txt +4 -1
- src/models/__pycache__/dasheng.cpython-310.pyc +0 -0
- src/models/__pycache__/sed_decoder.cpython-310.pyc +0 -0
- src/models/__pycache__/transformer.cpython-310.pyc +0 -0
- src/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- src/utils/__pycache__/utils.cpython-310.pyc +0 -0
__pycache__/api.cpython-310.pyc
ADDED
|
Binary file (5.45 kB). View file
|
|
|
app.py
CHANGED
|
@@ -3,10 +3,12 @@ import torch
|
|
| 3 |
from api import FlexSED
|
| 4 |
import tempfile
|
| 5 |
import os
|
|
|
|
| 6 |
|
| 7 |
# Load model once on startup
|
| 8 |
flexsed = FlexSED(device="cuda" if torch.cuda.is_available() else "cpu")
|
| 9 |
|
|
|
|
| 10 |
def run_flexsed(audio_file, event_list):
|
| 11 |
"""
|
| 12 |
Run inference using FlexSED and return prediction plot.
|
|
|
|
| 3 |
from api import FlexSED
|
| 4 |
import tempfile
|
| 5 |
import os
|
| 6 |
+
import spaces
|
| 7 |
|
| 8 |
# Load model once on startup
|
| 9 |
flexsed = FlexSED(device="cuda" if torch.cuda.is_available() else "cpu")
|
| 10 |
|
| 11 |
+
@spaces.GPU # 🚀 ensures this function runs on the GPU in Hugging Face Spaces
|
| 12 |
def run_flexsed(audio_file, event_list):
|
| 13 |
"""
|
| 14 |
Run inference using FlexSED and return prediction plot.
|
requirements.txt
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
gradio
|
| 2 |
torch
|
|
|
|
| 3 |
soundfile
|
| 4 |
matplotlib
|
| 5 |
numpy
|
| 6 |
-
librosa
|
|
|
|
|
|
|
|
|
| 1 |
gradio
|
| 2 |
torch
|
| 3 |
+
torchaudio
|
| 4 |
soundfile
|
| 5 |
matplotlib
|
| 6 |
numpy
|
| 7 |
+
librosa
|
| 8 |
+
transformers
|
| 9 |
+
einops
|
src/models/__pycache__/dasheng.cpython-310.pyc
ADDED
|
Binary file (19 kB). View file
|
|
|
src/models/__pycache__/sed_decoder.cpython-310.pyc
ADDED
|
Binary file (5.69 kB). View file
|
|
|
src/models/__pycache__/transformer.cpython-310.pyc
ADDED
|
Binary file (5.76 kB). View file
|
|
|
src/utils/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (151 Bytes). View file
|
|
|
src/utils/__pycache__/utils.cpython-310.pyc
ADDED
|
Binary file (3.63 kB). View file
|
|
|