Yilin0601 commited on
Commit
141103b
·
verified ·
1 Parent(s): 1e0e1c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -13,7 +13,7 @@ num_labels = 8
13
 
14
  # Pre-trained model: We're using facebook's wav2vec2-base-960h.
15
  # Since we are not fine-tuning, we are simply adding a classification head with random weights.
16
- model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/wav2vec2-base-960h", num_labels=num_labels)
17
  feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("facebook/wav2vec2-base-960h")
18
 
19
  # -------------------------------
@@ -58,7 +58,6 @@ iface = gr.Interface(
58
  title="L2 English Accuracy Predictor Demo",
59
  description=(
60
  "This demo uses Wav2Vec2ForSequenceClassification without fine-tuning. "
61
- "Since the classification head has not been trained for your multi‑level task, "
62
  "the prediction results are random and for demonstration purposes only."
63
  ),
64
  allow_flagging="never"
 
13
 
14
  # Pre-trained model: We're using facebook's wav2vec2-base-960h.
15
  # Since we are not fine-tuning, we are simply adding a classification head with random weights.
16
+ model = Wav2Vec2ForSequenceClassification.from_pretrained("facebook/wav2vec2-base-960h", num_labels=8)
17
  feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("facebook/wav2vec2-base-960h")
18
 
19
  # -------------------------------
 
58
  title="L2 English Accuracy Predictor Demo",
59
  description=(
60
  "This demo uses Wav2Vec2ForSequenceClassification without fine-tuning. "
 
61
  "the prediction results are random and for demonstration purposes only."
62
  ),
63
  allow_flagging="never"