macabdul9 commited on
Commit
82134ba
1 Parent(s): 8f17355

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -4
README.md CHANGED
@@ -99,7 +99,7 @@ We recommend using the model to respond to human instructions written in natural
99
  Since this decoder-only model is fine-tuned with wrapper text, we suggest using the same wrapper text to achieve the best performance.
100
  See the example on the right or the code below.
101
 
102
- We now show you how to load and use our model using HuggingFace `pipline()`.
103
 
104
  ```python
105
  # pip install -q transformers
@@ -107,17 +107,19 @@ from transformers import pipeline
107
 
108
  checkpoint = "{model_name}"
109
 
110
- model = pipeline('text-generation', model=checkpoint, use_auth_token=True)
111
 
112
  instruction = 'Please let me know your thoughts on the given place and why you think it deserves to be visited: \n"Barcelona, Spain"'
113
 
114
  input_prompt = f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
115
 
116
- generated_text = generator(input_prompt, max_length=512, do_sample=True)[0]['generated_text']
117
 
118
- print("Response": generated_text)
119
  ```
120
 
 
 
121
  ## Training Procedure
122
 
123
  <p align="center" width="100%">
 
99
  Since this decoder-only model is fine-tuned with wrapper text, we suggest using the same wrapper text to achieve the best performance.
100
  See the example on the right or the code below.
101
 
102
+ We now show you how to load and use our model using HuggingFace `pipeline()`.
103
 
104
  ```python
105
  # pip install -q transformers
 
107
 
108
  checkpoint = "{model_name}"
109
 
110
+ model = pipeline('text-generation', model = checkpoint)
111
 
112
  instruction = 'Please let me know your thoughts on the given place and why you think it deserves to be visited: \n"Barcelona, Spain"'
113
 
114
  input_prompt = f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
115
 
116
+ generated_text = model(input_prompt, max_length=512, do_sample=True)[0]['generated_text']
117
 
118
+ print("Response", generated_text)
119
  ```
120
 
121
+
122
+
123
  ## Training Procedure
124
 
125
  <p align="center" width="100%">