Thanh-Lam commited on
Commit
8f4a2bc
·
1 Parent(s): 2c4c515

Fix: model returns dict, not tuple

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -159,7 +159,9 @@ class MultiModelProfiler:
159
 
160
  # Inference
161
  with torch.no_grad():
162
- gender_logits, dialect_logits = model(input_tensor)
 
 
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)