Spaces:
Sleeping
Sleeping
Update Python library versions and Gradio syntax
Browse files- app.py +10 -14
- requirements.txt +7 -7
app.py
CHANGED
@@ -142,25 +142,21 @@ with gr.Blocks(css=css) as gr_app:
|
|
142 |
show_label=True,
|
143 |
max_lines=1,
|
144 |
placeholder="Type something, or click a suggested search below.",
|
145 |
-
|
146 |
-
container=False,
|
147 |
)
|
148 |
-
btn = gr.Button("Search", variant="primary")
|
149 |
with gr.Row(variant="compact"):
|
150 |
suggest1 = gr.Button(
|
151 |
-
"två hundar som leker i snön", variant="secondary"
|
152 |
-
).style(size="sm")
|
153 |
suggest2 = gr.Button(
|
154 |
-
"en fisker til sjøs i en båt", variant="secondary"
|
155 |
-
).style(size="sm")
|
156 |
suggest3 = gr.Button(
|
157 |
-
"cold dark alone on the street", variant="secondary"
|
158 |
-
).style(size="sm")
|
159 |
-
suggest4 = gr.Button("도로 위의 자동차들", variant="secondary"
|
160 |
-
gallery = gr.Gallery(label=False, show_label=False, elem_id="gallery")
|
161 |
-
grid=[6],
|
162 |
-
height="100%",
|
163 |
-
)
|
164 |
|
165 |
suggest1.click(clip_search, inputs=suggest1, outputs=gallery)
|
166 |
suggest2.click(clip_search, inputs=suggest2, outputs=gallery)
|
|
|
142 |
show_label=True,
|
143 |
max_lines=1,
|
144 |
placeholder="Type something, or click a suggested search below.",
|
145 |
+
container=False,
|
|
|
146 |
)
|
147 |
+
btn = gr.Button("Search", variant="primary") #.style(full_width=False)
|
148 |
with gr.Row(variant="compact"):
|
149 |
suggest1 = gr.Button(
|
150 |
+
"två hundar som leker i snön", variant="secondary", size="sm"
|
151 |
+
)# .style(size="sm")
|
152 |
suggest2 = gr.Button(
|
153 |
+
"en fisker til sjøs i en båt", variant="secondary", size="sm"
|
154 |
+
)# .style(size="sm")
|
155 |
suggest3 = gr.Button(
|
156 |
+
"cold dark alone on the street", variant="secondary", size="sm"
|
157 |
+
)# .style(size="sm")
|
158 |
+
suggest4 = gr.Button("도로 위의 자동차들", variant="secondary", size="sm")
|
159 |
+
gallery = gr.Gallery(label=False, show_label=False, elem_id="gallery", height="100%", columns=6)
|
|
|
|
|
|
|
160 |
|
161 |
suggest1.click(clip_search, inputs=suggest1, outputs=gallery)
|
162 |
suggest2.click(clip_search, inputs=suggest2, outputs=gallery)
|
requirements.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
clip==0.2.0
|
2 |
-
gradio==
|
3 |
multilingual_clip==1.0.10
|
4 |
-
numpy==1.
|
5 |
-
pandas==1.
|
6 |
-
Pillow==
|
7 |
-
Requests==2.
|
8 |
-
torch==1.
|
9 |
-
transformers==4.
|
|
|
1 |
clip==0.2.0
|
2 |
+
gradio==4.1.1
|
3 |
multilingual_clip==1.0.10
|
4 |
+
numpy==1.26
|
5 |
+
pandas==2.1.2
|
6 |
+
Pillow==10.1.0
|
7 |
+
Requests==2.31.0
|
8 |
+
torch==2.1.0
|
9 |
+
transformers==4.35.0
|