quazarcom commited on
Commit
6624d9f
·
verified ·
1 Parent(s): 7b4d3ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,7 +39,8 @@ def classify_image(img: Image.Image):
39
  with torch.no_grad():
40
  outputs = model(img_tensor)
41
  _, predicted = torch.max(outputs, 1)
42
- label = 'Fake' if predicted.item() == 0 else 'Real'
 
43
  return label
44
 
45
  # ✅ Then wrap it in predict()
 
39
  with torch.no_grad():
40
  outputs = model(img_tensor)
41
  _, predicted = torch.max(outputs, 1)
42
+ print("🔍 Prediction index:", predicted.item()) # Optional debug
43
+ label = 'Real' if predicted.item() == 0 else 'Fake'
44
  return label
45
 
46
  # ✅ Then wrap it in predict()