ksvmuralidhar commited on
Commit
a5fc389
1 Parent(s): 1610241

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ import zipfile
16
  with zipfile.ZipFile("Vegetable Images.zip", 'r') as zip_ref:
17
  zip_ref.extractall('.')
18
 
19
-
20
  class ImageVectorizer:
21
  '''
22
  Get vector representation of an image using VGG19 model fine tuned on vegetable images for classification
@@ -41,7 +41,7 @@ class ImageVectorizer:
41
  test_image = np.array([test_image])
42
  return model(test_image).numpy()[0]
43
 
44
-
45
  def get_milvus_collection():
46
  uri = os.environ.get("URI")
47
  token = os.environ.get("TOKEN")
 
16
  with zipfile.ZipFile("Vegetable Images.zip", 'r') as zip_ref:
17
  zip_ref.extractall('.')
18
 
19
+ @st.cache_resource
20
  class ImageVectorizer:
21
  '''
22
  Get vector representation of an image using VGG19 model fine tuned on vegetable images for classification
 
41
  test_image = np.array([test_image])
42
  return model(test_image).numpy()[0]
43
 
44
+ @st.cache_resource
45
  def get_milvus_collection():
46
  uri = os.environ.get("URI")
47
  token = os.environ.get("TOKEN")