smjain commited on
Commit
05dfef8
1 Parent(s): 0892a8a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -1
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" # change to the path where your model is saved
 
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'])