Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ processor = Wav2Vec2Processor.from_pretrained("HareemFatima/distilhubert-finetun
|
|
10 |
def detect_stutter(audio):
|
11 |
# Preprocess the audio
|
12 |
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", padding=True)
|
13 |
-
|
14 |
# Get model predictions
|
15 |
with torch.no_grad():
|
16 |
logits = model(**inputs).logits
|
@@ -25,3 +25,4 @@ iface = gr.Interface(fn=detect_stutter, inputs=gr.Audio(source="microphone", typ
|
|
25 |
|
26 |
# Launch the interface
|
27 |
iface.launch()
|
|
|
|
10 |
def detect_stutter(audio):
|
11 |
# Preprocess the audio
|
12 |
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", padding=True)
|
13 |
+
|
14 |
# Get model predictions
|
15 |
with torch.no_grad():
|
16 |
logits = model(**inputs).logits
|
|
|
25 |
|
26 |
# Launch the interface
|
27 |
iface.launch()
|
28 |
+
|