Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use a pipeline as a high-level helper
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
pipe = pipeline("zero-shot-image-classification", model="geolocal/StreetCLIP")
|
5 |
+
|
6 |
+
# Load model directly
|
7 |
+
from transformers import AutoProcessor, AutoModelForZeroShotImageClassification
|
8 |
+
|
9 |
+
processor = AutoProcessor.from_pretrained("geolocal/StreetCLIP")
|
10 |
+
model = AutoModelForZeroShotImageClassification.from_pretrained("geolocal/StreetCLIP")
|