Spaces:
Sleeping
Sleeping
included the models directory
Browse files- .gitignore +0 -3
- app/models/__init__.py +0 -0
- app/models/getModel.py +9 -0
.gitignore
CHANGED
|
@@ -9,8 +9,5 @@ __pycache__/
|
|
| 9 |
# DataSet
|
| 10 |
data/
|
| 11 |
|
| 12 |
-
# Exclude the models directory
|
| 13 |
-
models/
|
| 14 |
-
|
| 15 |
# Exclude the notebooks directory
|
| 16 |
notebooks/
|
|
|
|
| 9 |
# DataSet
|
| 10 |
data/
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
# Exclude the notebooks directory
|
| 13 |
notebooks/
|
app/models/__init__.py
ADDED
|
File without changes
|
app/models/getModel.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
pipe = pipeline("image-classification", "anurag629/swin-tiny-patch4-window7-224-finetuned-eurosat")
|
| 4 |
+
|
| 5 |
+
def getPrediction(image):
|
| 6 |
+
'''
|
| 7 |
+
Returns the prediction of the image.
|
| 8 |
+
'''
|
| 9 |
+
return pipe(image)
|