Fix: model returns dict, not tuple
Browse files
app.py
CHANGED
|
@@ -159,7 +159,9 @@ class MultiModelProfiler:
|
|
| 159 |
|
| 160 |
# Inference
|
| 161 |
with torch.no_grad():
|
| 162 |
-
|
|
|
|
|
|
|
| 163 |
|
| 164 |
gender_probs = torch.softmax(gender_logits, dim=-1)
|
| 165 |
dialect_probs = torch.softmax(dialect_logits, dim=-1)
|
|
|
|
| 159 |
|
| 160 |
# Inference
|
| 161 |
with torch.no_grad():
|
| 162 |
+
outputs = model(input_tensor)
|
| 163 |
+
gender_logits = outputs['gender_logits']
|
| 164 |
+
dialect_logits = outputs['dialect_logits']
|
| 165 |
|
| 166 |
gender_probs = torch.softmax(gender_logits, dim=-1)
|
| 167 |
dialect_probs = torch.softmax(dialect_logits, dim=-1)
|