Update README.md
Browse files
README.md
CHANGED
|
@@ -45,8 +45,9 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 45 |
model_name = "skshmjn/Llama-3.2-1B-Mongo-Instruct"
|
| 46 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 47 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
|
|
|
| 48 |
|
| 49 |
-
prompt = "Find all employees older than 30 in the 'employees' collection."
|
| 50 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 51 |
|
| 52 |
output = model.generate(**inputs, max_length=100)
|
|
|
|
| 45 |
model_name = "skshmjn/Llama-3.2-1B-Mongo-Instruct"
|
| 46 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 47 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 48 |
+
schema = {} // Pass your mongodb schema here
|
| 49 |
|
| 50 |
+
prompt = "Here is mongodb schema {schema} and Find all employees older than 30 in the 'employees' collection."
|
| 51 |
inputs = tokenizer(prompt, return_tensors="pt")
|
| 52 |
|
| 53 |
output = model.generate(**inputs, max_length=100)
|