Upload google_embeddinggemma-300m_3.txt with huggingface_hub
Browse files
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
|