methodw commited on
Commit
9e24c92
·
1 Parent(s): 6d6291a

try different mongo setup

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -19,8 +19,6 @@ dino_v2_image_processor = AutoImageProcessor.from_pretrained("./dinov2-base")
19
 
20
  # MongoDB
21
  MONGO_URI = os.environ.get("MONGO_URI")
22
- mongo = MongoClient(MONGO_URI)
23
- db = mongo["xbgp"]
24
 
25
 
26
  def process_image(image):
@@ -31,6 +29,10 @@ def process_image(image):
31
  # This will include preprocessing the image, passing it through the model,
32
  # and then formatting the output (extracted features).
33
 
 
 
 
 
34
  # Load the index
35
  with open("images.json", "r") as f:
36
  images = json.load(f)
 
19
 
20
  # MongoDB
21
  MONGO_URI = os.environ.get("MONGO_URI")
 
 
22
 
23
 
24
  def process_image(image):
 
29
  # This will include preprocessing the image, passing it through the model,
30
  # and then formatting the output (extracted features).
31
 
32
+ # MongoDB
33
+ mongo = MongoClient(MONGO_URI)
34
+ db = mongo["xbgp"]
35
+
36
  # Load the index
37
  with open("images.json", "r") as f:
38
  images = json.load(f)