Spaces:
Sleeping
Sleeping
Create models/image_model.py
Browse files- models/image_model.py +8 -0
models/image_model.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
# Public, stable image classifier (generic). You can swap to a deepfake-specific model later.
|
| 4 |
+
image_model = pipeline(
|
| 5 |
+
task="image-classification",
|
| 6 |
+
model="google/vit-base-patch16-224",
|
| 7 |
+
device=-1 # CPU
|
| 8 |
+
)
|