gabrielchua commited on
Commit
d56c17a
·
verified ·
1 Parent(s): dda1748

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -0
README.md CHANGED
@@ -60,6 +60,10 @@ model = AutoModel.from_pretrained("govtech/lionguard-2-lite", trust_remote_code=
60
 
61
  # Download model from the 🤗 Hub
62
  embedding_model = SentenceTransformer("google/embeddinggemma-300m")
 
 
 
 
63
  # Add prompt instructions to generate embeddings that are optimized to classify texts according to preset labels
64
  formatted_texts = [f"task: classification | query: {c}" for c in texts]
65
  embeddings = embedding_model.encode(formatted_texts) # NOTE: use encode() instead of encode_documents()
 
60
 
61
  # Download model from the 🤗 Hub
62
  embedding_model = SentenceTransformer("google/embeddinggemma-300m")
63
+
64
+ # Text to classify
65
+ texts = ["hello", "world"]
66
+
67
  # Add prompt instructions to generate embeddings that are optimized to classify texts according to preset labels
68
  formatted_texts = [f"task: classification | query: {c}" for c in texts]
69
  embeddings = embedding_model.encode(formatted_texts) # NOTE: use encode() instead of encode_documents()