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