willco-afk commited on
Commit
9eaaba5
·
verified ·
1 Parent(s): c6cea3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +53 -2
app.py CHANGED
@@ -16,8 +16,59 @@ client = chromadb.Client()
16
  # Create a Chroma collection
17
  collection = client.create_collection(name="tree_images")
18
 
19
- # Example data (you can replace this with your actual content or dataset)
20
- content = ["Tree 1: Decorated with lights", "Tree 2: Undecorated", "Tree 3: Decorated with ornaments"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  # Function to generate embeddings using the pre-trained model
23
  def generate_embeddings(texts):
 
16
  # Create a Chroma collection
17
  collection = client.create_collection(name="tree_images")
18
 
19
+ # Custom dataset of tree descriptions (both decorated and undecorated)
20
+ content = [
21
+ "Tree 1: Decorated with colorful lights and a star on top",
22
+ "Tree 2: Undecorated, only a bare tree with no lights or ornaments",
23
+ "Tree 3: Decorated with silver tinsel and baubles",
24
+ "Tree 4: Undecorated, only green branches",
25
+ "Tree 5: Decorated with red ribbons and golden ornaments",
26
+ "Tree 6: Undecorated, a plain pine tree",
27
+ "Tree 7: Decorated with multicolored lights and silver bells",
28
+ "Tree 8: Undecorated, just a tree with no decorations",
29
+ "Tree 9: Decorated with handmade ornaments and garlands",
30
+ "Tree 10: Undecorated, a simple tree without any adornment",
31
+ "Tree 11: Decorated with blue and white lights and a snowflake theme",
32
+ "Tree 12: Undecorated, only branches with no adornments",
33
+ "Tree 13: Decorated with red and green ornaments and candy canes",
34
+ "Tree 14: Undecorated, just a tall and natural-looking tree",
35
+ "Tree 15: Decorated with silver garlands and a star topper",
36
+ "Tree 16: Undecorated, a bare spruce tree",
37
+ "Tree 17: Decorated with gold and red ornaments, and a snowman figure",
38
+ "Tree 18: Undecorated, a simple fir tree with no extras",
39
+ "Tree 19: Decorated with colorful LED lights and a bow on top",
40
+ "Tree 20: Undecorated, just a bare tree with no lights or baubles",
41
+ "Tree 21: Decorated with small fairy lights and a red ribbon",
42
+ "Tree 22: Undecorated, just a simple tree with green branches",
43
+ "Tree 23: Decorated with golden stars and white snowflakes",
44
+ "Tree 24: Undecorated, just a natural green pine tree",
45
+ "Tree 25: Decorated with pink ornaments and a gold topper",
46
+ "Tree 26: Undecorated, no decorations, just a plain tree",
47
+ "Tree 27: Decorated with silver and blue ornaments and a festive ribbon",
48
+ "Tree 28: Undecorated, just a fresh pine tree",
49
+ "Tree 29: Decorated with white fairy lights and a Christmas angel on top",
50
+ "Tree 30: Undecorated, only the green foliage of the tree",
51
+ "Tree 31: Decorated with bright red ornaments and golden tinsel",
52
+ "Tree 32: Undecorated, no lights or decorations, just branches",
53
+ "Tree 33: Decorated with silver tinsel, green ribbons, and a star",
54
+ "Tree 34: Undecorated, plain with no adornments",
55
+ "Tree 35: Decorated with red and white ornaments, and a Santa figurine",
56
+ "Tree 36: Undecorated, just a bare tree",
57
+ "Tree 37: Decorated with rainbow lights and colorful ornaments",
58
+ "Tree 38: Undecorated, a simple evergreen tree with no additions",
59
+ "Tree 39: Decorated with small golden bells and a red bow",
60
+ "Tree 40: Undecorated, no ornaments or lights",
61
+ "Tree 41: Decorated with silver baubles, white snowflakes, and a red star",
62
+ "Tree 42: Undecorated, just a natural tree with no accessories",
63
+ "Tree 43: Decorated with multicolor ribbons and white angel decorations",
64
+ "Tree 44: Undecorated, no adornments, just the tree itself",
65
+ "Tree 45: Decorated with large silver baubles and a golden star",
66
+ "Tree 46: Undecorated, no decorations, just a green tree",
67
+ "Tree 47: Decorated with white snowflakes, red ribbons, and a Santa hat",
68
+ "Tree 48: Undecorated, a bare tree with no lights or ornaments",
69
+ "Tree 49: Decorated with small lights and star-shaped ornaments",
70
+ "Tree 50: Undecorated, only the tree, no adornments or lights"
71
+ ]
72
 
73
  # Function to generate embeddings using the pre-trained model
74
  def generate_embeddings(texts):