saakshigupta commited on
Commit
f3c6a55
·
verified ·
1 Parent(s): d4c5c7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -900,8 +900,8 @@ def main():
900
  pred_class = torch.argmax(probabilities).item()
901
  confidence = probabilities[pred_class].item()
902
 
903
- # Explicit class mapping - adjust if needed based on your model
904
- pred_label = "Fake" if pred_class == 0 else "Real"
905
  except Exception as e:
906
  st.error(f"Error in model inference: {str(e)}")
907
  import traceback
 
900
  pred_class = torch.argmax(probabilities).item()
901
  confidence = probabilities[pred_class].item()
902
 
903
+ # Explicit class mapping - 0 = Real, 1 = Fake
904
+ pred_label = "Real" if pred_class == 0 else "Fake"
905
  except Exception as e:
906
  st.error(f"Error in model inference: {str(e)}")
907
  import traceback