Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ from PIL import Image
|
|
| 8 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
| 9 |
images="dog.jpg"
|
| 10 |
|
|
|
|
| 11 |
def shot(image, labels_text):
|
| 12 |
PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
|
| 13 |
labels = labels_text.split(",")
|
|
|
|
| 8 |
pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch32")
|
| 9 |
images="dog.jpg"
|
| 10 |
|
| 11 |
+
@spaces.GPU
|
| 12 |
def shot(image, labels_text):
|
| 13 |
PIL_image = Image.fromarray(np.uint8(image)).convert('RGB')
|
| 14 |
labels = labels_text.split(",")
|