Update README.md
Browse files
README.md
CHANGED
@@ -86,11 +86,15 @@ logging.set_verbosity(logging.CRITICAL)
|
|
86 |
|
87 |
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
88 |
|
89 |
-
prompt_template =
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
94 |
print(outputs[0]['generated_text'])
|
95 |
```
|
96 |
|
|
|
86 |
|
87 |
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
88 |
|
89 |
+
prompt_template = '''Below is an instruction that describes a task. Write a response that appropriately completes the request
|
90 |
+
|
91 |
+
### Instruction: {prompt}
|
92 |
+
|
93 |
+
### Response:'''
|
94 |
+
prompt = prompt_template.format(prompt="How do I sort a list in Python?")
|
95 |
+
|
96 |
+
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.2, top_k=50, top_p=0.95)
|
97 |
+
|
98 |
print(outputs[0]['generated_text'])
|
99 |
```
|
100 |
|