Spaces:
Running
Running
Commit ·
2c3f313
1
Parent(s): b21e243
Fix import order for backend
Browse files- backend/app.py +5 -3
backend/app.py
CHANGED
|
@@ -1,4 +1,9 @@
|
|
| 1 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import torch
|
| 3 |
import numpy as np
|
| 4 |
import torch.nn.functional as F
|
|
@@ -7,11 +12,8 @@ from fastapi.responses import JSONResponse
|
|
| 7 |
from fastapi.staticfiles import StaticFiles
|
| 8 |
from fastapi.middleware.cors import CORSMiddleware
|
| 9 |
from dataset import compute_cqcc
|
| 10 |
-
import sys
|
| 11 |
import librosa
|
| 12 |
|
| 13 |
-
sys.path.append(os.path.dirname(__file__))
|
| 14 |
-
|
| 15 |
from models import (
|
| 16 |
Wav2Vec2SpoofDetector,
|
| 17 |
AASISTDetector,
|
|
|
|
| 1 |
import os
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
# Add the current directory to sys.path so we can import local modules
|
| 5 |
+
sys.path.append(os.path.dirname(__file__))
|
| 6 |
+
|
| 7 |
import torch
|
| 8 |
import numpy as np
|
| 9 |
import torch.nn.functional as F
|
|
|
|
| 12 |
from fastapi.staticfiles import StaticFiles
|
| 13 |
from fastapi.middleware.cors import CORSMiddleware
|
| 14 |
from dataset import compute_cqcc
|
|
|
|
| 15 |
import librosa
|
| 16 |
|
|
|
|
|
|
|
| 17 |
from models import (
|
| 18 |
Wav2Vec2SpoofDetector,
|
| 19 |
AASISTDetector,
|