anilbhatt1 commited on
Commit
ddbeb7c
1 Parent(s): 80d1ab2

Modified req.txt and app.py

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. requirements.txt +7 -4
app.py CHANGED
@@ -196,14 +196,14 @@ def get_matched_image(matches, val_file_dict_loaded):
196
 
197
  def get_grayscale_image(text_query):
198
  model_inf = CLIPModel().to('cpu')
199
- model_inf.load_state_dict(torch.load('./best_clip_model_cpu.pt', map_location='cpu'))
200
 
201
- clip_image_embeddings_np_inf = np.load('./clip_image_embeddings.npy')
202
  image_embeddings_inf = torch.tensor(clip_image_embeddings_np_inf)
203
 
204
- img_file_names = np.load('./val_img_file_names.npy',allow_pickle=True)
205
 
206
- with open("./val_imgs_rle_encode.json", "r") as json_file:
207
  val_file_dict_loaded = json.load(json_file)
208
 
209
  matches = find_matches_cpu(model_inf,
 
196
 
197
  def get_grayscale_image(text_query):
198
  model_inf = CLIPModel().to('cpu')
199
+ model_inf.load_state_dict(torch.load('best_clip_model_cpu.pt', map_location='cpu'))
200
 
201
+ clip_image_embeddings_np_inf = np.load('clip_image_embeddings.npy')
202
  image_embeddings_inf = torch.tensor(clip_image_embeddings_np_inf)
203
 
204
+ img_file_names = np.load('val_img_file_names.npy',allow_pickle=True)
205
 
206
+ with open("val_imgs_rle_encode.json", "r") as json_file:
207
  val_file_dict_loaded = json.load(json_file)
208
 
209
  matches = find_matches_cpu(model_inf,
requirements.txt CHANGED
@@ -1,4 +1,7 @@
1
- transformers
2
- gradio
3
- timm
4
- torch
 
 
 
 
1
+ transformers==4.33.3
2
+ gradio==3.46.0
3
+ timm==0.9.7
4
+ --extra-index-url https://download.pytorch.org/whl/cpu/
5
+ torch==2.0.0+cpu
6
+ torchvision==0.15.1+cpu
7
+ opencv-python-headless==4.8.0.76