Update README.md
Browse files
README.md
CHANGED
@@ -12,10 +12,16 @@ Sample code
|
|
12 |
from transformers import pipeline
|
13 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
14 |
|
15 |
-
model_path = "smjain/abap-nous-hermes"
|
|
|
16 |
model = AutoModelForCausalLM.from_pretrained(model_path)
|
|
|
17 |
tokenizer = AutoTokenizer.from_pretrained('NousResearch/llama-2-7b-chat-hf')
|
|
|
18 |
prompt = "Write a sample ABAP report" # change to your desired prompt
|
|
|
19 |
gen = pipeline('text-generation', model=model, tokenizer=tokenizer,max_new_tokens=256)
|
|
|
20 |
result = gen(prompt)
|
|
|
21 |
print(result[0]['generated_text'])
|
|
|
12 |
from transformers import pipeline
|
13 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
14 |
|
15 |
+
model_path = "smjain/abap-nous-hermes"
|
16 |
+
|
17 |
model = AutoModelForCausalLM.from_pretrained(model_path)
|
18 |
+
|
19 |
tokenizer = AutoTokenizer.from_pretrained('NousResearch/llama-2-7b-chat-hf')
|
20 |
+
|
21 |
prompt = "Write a sample ABAP report" # change to your desired prompt
|
22 |
+
|
23 |
gen = pipeline('text-generation', model=model, tokenizer=tokenizer,max_new_tokens=256)
|
24 |
+
|
25 |
result = gen(prompt)
|
26 |
+
|
27 |
print(result[0]['generated_text'])
|