Spaces:
Sleeping
Sleeping
Prathmesh48
commited on
Commit
•
017ea8d
1
Parent(s):
5c5c323
Update embedding.py
Browse files- embedding.py +3 -3
embedding.py
CHANGED
@@ -340,7 +340,7 @@ def get_embed_chroma(link):
|
|
340 |
print("\u2713 Writing Tag Data")
|
341 |
|
342 |
# Creating Vector
|
343 |
-
|
344 |
# textual_data = []
|
345 |
print("\u2713 Creating Vectors")
|
346 |
|
@@ -376,12 +376,12 @@ def get_embed_chroma(link):
|
|
376 |
# Convert the outputs to numpy and process as needed
|
377 |
last_hidden_state = np.array(outputs[0])
|
378 |
embeddings = last_hidden_state.mean(axis=1).tolist()
|
379 |
-
|
380 |
# textual_data.a(text)
|
381 |
|
382 |
# t2 = time.time()
|
383 |
# print(t2-t1)
|
384 |
-
return chunks ,
|
385 |
|
386 |
|
387 |
def get_image_embeddings(Product):
|
|
|
340 |
print("\u2713 Writing Tag Data")
|
341 |
|
342 |
# Creating Vector
|
343 |
+
embedding_vectors=[]
|
344 |
# textual_data = []
|
345 |
print("\u2713 Creating Vectors")
|
346 |
|
|
|
376 |
# Convert the outputs to numpy and process as needed
|
377 |
last_hidden_state = np.array(outputs[0])
|
378 |
embeddings = last_hidden_state.mean(axis=1).tolist()
|
379 |
+
embedding_vectors.extend(embeddings)
|
380 |
# textual_data.a(text)
|
381 |
|
382 |
# t2 = time.time()
|
383 |
# print(t2-t1)
|
384 |
+
return chunks , embedding_vectors
|
385 |
|
386 |
|
387 |
def get_image_embeddings(Product):
|