Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,10 +6,8 @@ from vit_model_test import CustomModel
|
|
| 6 |
model = CustomModel()
|
| 7 |
|
| 8 |
def predict(image: Image.Image):
|
| 9 |
-
animation.visible = True # Show the animation
|
| 10 |
label, confidence = model.predict(image)
|
| 11 |
result = "AI image" if label == 1 else "Real image"
|
| 12 |
-
animation.visible = False # Hide the animation
|
| 13 |
return result, f"Confidence: {confidence:.2f}%"
|
| 14 |
|
| 15 |
|
|
|
|
| 6 |
model = CustomModel()
|
| 7 |
|
| 8 |
def predict(image: Image.Image):
|
|
|
|
| 9 |
label, confidence = model.predict(image)
|
| 10 |
result = "AI image" if label == 1 else "Real image"
|
|
|
|
| 11 |
return result, f"Confidence: {confidence:.2f}%"
|
| 12 |
|
| 13 |
|