unzip to py extract_all
Browse files
app.py
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
import s23_openai_clip
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
|
5 |
# query_text = "dogs on the grass"
|
6 |
image_path = "./Images"
|
7 |
|
8 |
-
|
|
|
|
|
|
|
9 |
_, valid_df = make_train_valid_dfs()
|
10 |
model, image_embeddings = get_image_embeddings(valid_df, "best.pt")
|
11 |
|
|
|
1 |
import s23_openai_clip
|
2 |
import gradio as gr
|
3 |
+
import zipfile
|
4 |
|
5 |
|
6 |
# query_text = "dogs on the grass"
|
7 |
image_path = "./Images"
|
8 |
|
9 |
+
|
10 |
+
with zipfile.ZipFile('flickr8k.zip', 'r') as zip_ref:
|
11 |
+
zip_ref.extractall('Images')
|
12 |
+
|
13 |
_, valid_df = make_train_valid_dfs()
|
14 |
model, image_embeddings = get_image_embeddings(valid_df, "best.pt")
|
15 |
|