raja5259 commited on
Commit
731aa7c
·
verified ·
1 Parent(s): 17bead0

unzip to py extract_all

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- !unzip flickr8k.zip
 
 
 
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