Spaces:
Runtime error
Runtime error
Update DeepfakeModel.py
Browse files- DeepfakeModel.py +3 -1
DeepfakeModel.py
CHANGED
|
@@ -6,9 +6,11 @@ import torchaudio
|
|
| 6 |
import torch.nn.functional as F
|
| 7 |
import torch
|
| 8 |
from transformers import AutoProcessor, AutoModelForAudioClassification
|
|
|
|
| 9 |
|
|
|
|
| 10 |
# Model setup
|
| 11 |
-
model_path = r"
|
| 12 |
processor = AutoProcessor.from_pretrained(model_path)
|
| 13 |
model = AutoModelForAudioClassification.from_pretrained(
|
| 14 |
pretrained_model_name_or_path=model_path,
|
|
|
|
| 6 |
import torch.nn.functional as F
|
| 7 |
import torch
|
| 8 |
from transformers import AutoProcessor, AutoModelForAudioClassification
|
| 9 |
+
from pathlib import Path
|
| 10 |
|
| 11 |
+
app_dir = Path(__file__).parent
|
| 12 |
# Model setup
|
| 13 |
+
model_path = app_dir + r"\Deepfake\model"
|
| 14 |
processor = AutoProcessor.from_pretrained(model_path)
|
| 15 |
model = AutoModelForAudioClassification.from_pretrained(
|
| 16 |
pretrained_model_name_or_path=model_path,
|