ariG23498 HF Staff commited on
Commit
976d949
·
verified ·
1 Parent(s): 70ff6dd

Upload google_embeddinggemma-300m_3.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. google_embeddinggemma-300m_3.txt +17 -0
google_embeddinggemma-300m_3.txt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ words = ["apple", "banana", "car"]
3
+
4
+ # Calculate embeddings by calling model.encode()
5
+ embeddings = model.encode(words)
6
+
7
+ print(embeddings)
8
+ for idx, embedding in enumerate(embeddings):
9
+ print(f"Embedding {idx+1} (shape): {embedding.shape}")
10
+ ```
11
+
12
+ ERROR:
13
+ Traceback (most recent call last):
14
+ File "/tmp/google_embeddinggemma-300m_3m779bD.py", line 17, in <module>
15
+ embeddings = model.encode(words)
16
+ ^^^^^
17
+ NameError: name 'model' is not defined