Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,12 +72,13 @@ if file_name is not None:
|
|
| 72 |
col1.image(image, use_column_width=True)
|
| 73 |
predictions = get_prediction(image)
|
| 74 |
|
| 75 |
-
col2.header("Probabilities")
|
| 76 |
if binary:
|
| 77 |
-
|
|
|
|
| 78 |
col2.markdown(":green[real image!]")
|
| 79 |
else:
|
| 80 |
col2.markdown(":red[fake image!]")
|
| 81 |
else:
|
|
|
|
| 82 |
for idx,p in enumerate(predictions):
|
| 83 |
col2.text(f"{ models[idx] }: { round(p * 100, 2)}%")
|
|
|
|
| 72 |
col1.image(image, use_column_width=True)
|
| 73 |
predictions = get_prediction(image)
|
| 74 |
|
|
|
|
| 75 |
if binary:
|
| 76 |
+
col2.header("Prediction")
|
| 77 |
+
if predictions[6] > 0.5:
|
| 78 |
col2.markdown(":green[real image!]")
|
| 79 |
else:
|
| 80 |
col2.markdown(":red[fake image!]")
|
| 81 |
else:
|
| 82 |
+
col2.header("Probabilities")
|
| 83 |
for idx,p in enumerate(predictions):
|
| 84 |
col2.text(f"{ models[idx] }: { round(p * 100, 2)}%")
|