Update app.py
Browse files
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 -
|
904 |
-
pred_label = "
|
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
|