Update app.py
Browse files
app.py
CHANGED
|
@@ -12,10 +12,7 @@ import torch.nn as nn
|
|
| 12 |
import torch.nn.functional as F
|
| 13 |
from torch.utils.data import Dataset, DataLoader
|
| 14 |
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor, Wav2Vec2ForSequenceClassification
|
| 15 |
-
from sklearn.model_selection import train_test_split
|
| 16 |
-
import re
|
| 17 |
from collections import Counter
|
| 18 |
-
from sklearn.metrics import classification_report
|
| 19 |
model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/wav2vec2-base-960h", num_labels=2).to(device)
|
| 20 |
model_path = "dysarthria_classifier12.pth"
|
| 21 |
if os.path.exists(model_path):
|
|
|
|
| 12 |
import torch.nn.functional as F
|
| 13 |
from torch.utils.data import Dataset, DataLoader
|
| 14 |
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor, Wav2Vec2ForSequenceClassification
|
|
|
|
|
|
|
| 15 |
from collections import Counter
|
|
|
|
| 16 |
model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/wav2vec2-base-960h", num_labels=2).to(device)
|
| 17 |
model_path = "dysarthria_classifier12.pth"
|
| 18 |
if os.path.exists(model_path):
|