Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
-
from transformers import
|
| 4 |
|
| 5 |
# Load the model and processor from Hugging Face
|
| 6 |
-
model =
|
| 7 |
-
processor =
|
| 8 |
|
| 9 |
# Define a function for stutter detection
|
| 10 |
def detect_stutter(audio):
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
+
from transformers import HubertForSequenceClassification, HubertProcessor
|
| 4 |
|
| 5 |
# Load the model and processor from Hugging Face
|
| 6 |
+
model = HubertForSequenceClassification.from_pretrained("HareemFatima/distilhubert-finetuned-stutterdetection")
|
| 7 |
+
processor = HubertProcessor.from_pretrained("HareemFatima/distilhubert-finetuned-stutterdetection")
|
| 8 |
|
| 9 |
# Define a function for stutter detection
|
| 10 |
def detect_stutter(audio):
|