Update app.py
Browse files
app.py
CHANGED
@@ -320,7 +320,7 @@ def translate_sign_language(gesture):
|
|
320 |
# Identify the hand gesture
|
321 |
predicted_prod_label = predicted_prod_label.squeeze(0)
|
322 |
|
323 |
-
idx_to_label =
|
324 |
gesture_translation = idx_to_label[predicted_prod_label.cpu().numpy().item()] # Convert to a scalar
|
325 |
|
326 |
# Frame generator for real-time streaming
|
|
|
320 |
# Identify the hand gesture
|
321 |
predicted_prod_label = predicted_prod_label.squeeze(0)
|
322 |
|
323 |
+
idx_to_label = model_pretrained_2.config.id2label
|
324 |
gesture_translation = idx_to_label[predicted_prod_label.cpu().numpy().item()] # Convert to a scalar
|
325 |
|
326 |
# Frame generator for real-time streaming
|