Spaces:
Running on Zero
Running on Zero
Upload folder using huggingface_hub
Browse files- app.py +1 -0
- requirements.txt +1 -0
- src/demo_professional.py +2 -0
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import urllib.request
|
|
| 6 |
from pathlib import Path
|
| 7 |
from types import SimpleNamespace
|
| 8 |
|
|
|
|
| 9 |
import torch
|
| 10 |
from huggingface_hub import hf_hub_download
|
| 11 |
|
|
|
|
| 6 |
from pathlib import Path
|
| 7 |
from types import SimpleNamespace
|
| 8 |
|
| 9 |
+
import spaces
|
| 10 |
import torch
|
| 11 |
from huggingface_hub import hf_hub_download
|
| 12 |
|
requirements.txt
CHANGED
|
@@ -8,6 +8,7 @@
|
|
| 8 |
|
| 9 |
torch==2.8.0
|
| 10 |
torchaudio==2.8.0
|
|
|
|
| 11 |
|
| 12 |
numpy>=1.23.0,<2.0
|
| 13 |
pandas>=1.5.0
|
|
|
|
| 8 |
|
| 9 |
torch==2.8.0
|
| 10 |
torchaudio==2.8.0
|
| 11 |
+
pydantic==2.10.6
|
| 12 |
|
| 13 |
numpy>=1.23.0,<2.0
|
| 14 |
pandas>=1.5.0
|
src/demo_professional.py
CHANGED
|
@@ -24,6 +24,7 @@ import json
|
|
| 24 |
from pathlib import Path
|
| 25 |
from types import SimpleNamespace
|
| 26 |
|
|
|
|
| 27 |
import gradio as gr
|
| 28 |
import torch
|
| 29 |
|
|
@@ -397,6 +398,7 @@ def create_demo(args):
|
|
| 397 |
|
| 398 |
model = load_model(build_model_args(args), device)
|
| 399 |
|
|
|
|
| 400 |
def analyze(audio_path):
|
| 401 |
if audio_path is None:
|
| 402 |
empty = "<div class='empty-message'>Upload an audio file to begin analysis.</div>"
|
|
|
|
| 24 |
from pathlib import Path
|
| 25 |
from types import SimpleNamespace
|
| 26 |
|
| 27 |
+
import spaces
|
| 28 |
import gradio as gr
|
| 29 |
import torch
|
| 30 |
|
|
|
|
| 398 |
|
| 399 |
model = load_model(build_model_args(args), device)
|
| 400 |
|
| 401 |
+
@spaces.GPU(duration=30)
|
| 402 |
def analyze(audio_path):
|
| 403 |
if audio_path is None:
|
| 404 |
empty = "<div class='empty-message'>Upload an audio file to begin analysis.</div>"
|