Spaces:
Running
Running
tasmiachow
commited on
Commit
•
c7b34db
1
Parent(s):
6c61156
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,8 @@ model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
|
|
9 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
10 |
|
11 |
# Define a list of target words for the game
|
12 |
-
words = ["cat", "car", "tree", "house", "dog"
|
|
|
13 |
|
14 |
# Precompute text embeddings for faster comparisons
|
15 |
text_inputs = processor(text=words, return_tensors="pt", padding=True)
|
@@ -53,7 +54,7 @@ interface = gr.Interface(
|
|
53 |
inputs=gr.Sketchpad(),
|
54 |
outputs="text",
|
55 |
live=True,
|
56 |
-
description="Draw cat, car, tree, house, dog
|
57 |
)
|
58 |
|
59 |
interface.launch()
|
|
|
9 |
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
|
10 |
|
11 |
# Define a list of target words for the game
|
12 |
+
words = ["cat", "car", "tree", "house", "dog", "cloud", "flower", "bicycle", "boat", "star", "bird", "fish", "sun"]
|
13 |
+
|
14 |
|
15 |
# Precompute text embeddings for faster comparisons
|
16 |
text_inputs = processor(text=words, return_tensors="pt", padding=True)
|
|
|
54 |
inputs=gr.Sketchpad(),
|
55 |
outputs="text",
|
56 |
live=True,
|
57 |
+
description="Draw cat, car, tree, house, dog, cloud, flower, bicycle, boat, star, bird, fish, sun"
|
58 |
)
|
59 |
|
60 |
interface.launch()
|