Fix FAKE/REAL class index mapping in inference
Browse files299 unmodified lines300301302303304303304305306307299 unmodified lines probs = torch.softmax(logits, dim=1).cpu().numpy()
for idx, (orig_frame, (crop, has_face)) in enumerate(zip(frames, crops_info)): p_real = float(probs[idx, 0]) p_fake = float(probs[idx, 1]) p_fake = float(probs[idx, 0]) p_real = float(probs[idx, 1]) label = "fake" if p_fake >= p_real else "real" score = p_fake if label == "fake" else p_real
app.py+2-2