Update README.md
Browse files
README.md
CHANGED
@@ -82,7 +82,7 @@ pipeline = transformers.pipeline(
|
|
82 |
|
83 |
</details>
|
84 |
|
85 |
-
###
|
86 |
|
87 |
```python
|
88 |
question = """The bakers at the Beverly Hills Bakery baked 200 loaves of bread on Monday morning.
|
@@ -109,8 +109,78 @@ print(outputs[0]["generated_text"][len(prompt):])
|
|
109 |
|
110 |
```
|
111 |
***Generation:
|
112 |
-
|1|
|
113 |
-
|2|
|
114 |
-
|3|
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
</details>
|
84 |
|
85 |
+
### Example 1
|
86 |
|
87 |
```python
|
88 |
question = """The bakers at the Beverly Hills Bakery baked 200 loaves of bread on Monday morning.
|
|
|
109 |
|
110 |
```
|
111 |
***Generation:
|
112 |
+
|1|Calculate total sold|Add morning and afternoon sales|132|
|
113 |
+
|2|Subtract sold from total|200 - 132|68|
|
114 |
+
|3|Adjust for returns|Add returned loaves to remaining|74|
|
115 |
+
```
|
116 |
+
|
117 |
+
### Example 1
|
118 |
+
|
119 |
+
```python
|
120 |
+
question = """How many r's are in the word "strawberry"?""
|
121 |
+
|
122 |
+
|
123 |
+
messages = [
|
124 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
125 |
+
{"role": "user", "content": question},
|
126 |
+
]
|
127 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
128 |
+
# print("***Prompt:\n", prompt)
|
129 |
+
|
130 |
+
outputs = pipeline(prompt, max_new_tokens=1000, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
131 |
+
print("***Generation:")
|
132 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
133 |
+
|
134 |
+
```
|
135 |
+
|
136 |
+
```
|
137 |
+
***Generation:
|
138 |
+
|1|Calculate total sold|Add morning and afternoon sales|132|
|
139 |
+
|2|Subtract sold from total|200 - 132|68|
|
140 |
+
|3|Adjust for returns|Add returned loaves to remaining|74|
|
141 |
+
```
|
142 |
+
|
143 |
+
### Example 2
|
144 |
+
|
145 |
+
```
|
146 |
+
question = "What's a good recipe for a spicy margarita?"
|
147 |
+
|
148 |
+
messages = [
|
149 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
150 |
+
{"role": "user", "content": question},
|
151 |
+
]
|
152 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
153 |
+
# print("***Prompt:\n", prompt)
|
154 |
+
|
155 |
+
outputs = pipeline(prompt, max_new_tokens=1000, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
156 |
+
print("***Generation:")
|
157 |
+
print(outputs[0]["generated_text"][len(prompt):])
|
158 |
+
```
|
159 |
+
|
160 |
+
```
|
161 |
+
***Generation:
|
162 |
+
To make a Spicy Margarita, you'll need to incorporate a chili or pepper element into your classic margarita recipe. Here’s a simple way to do it:
|
163 |
+
|
164 |
+
### Ingredients:
|
165 |
+
- 2 oz tequila (blanco or reposado)
|
166 |
+
- 1 oz fresh lime juice
|
167 |
+
- 1/2 oz triple sec (Cointreau or Grand Marnier)
|
168 |
+
- 1/2 oz agave syrup or simple syrup
|
169 |
+
- 1-2 slices of jalapeño (or more depending on how spicy you like it)
|
170 |
+
- Salt and/or chili powder for rimming the glass
|
171 |
+
- Ice
|
172 |
+
- Lime wheel for garnish
|
173 |
+
|
174 |
+
### Instructions:
|
175 |
+
1. **Muddle Jalapeño**: In a shaker, muddle the jalapeño slices slightly. This will release the oils and heat from the peppers.
|
176 |
+
2. **Add Remaining Ingredients**: Add the tequila, lime juice, triple sec, and agave syrup or simple syrup.
|
177 |
+
3. **Shake and Strain**: Fill the shaker with ice and shake vigorously until cold. Strain into a salt and/or chili powder rimmed glass filled with ice.
|
178 |
+
4. **Garnish and Serve**: Garnish with a lime wheel and enjoy.
|
179 |
+
|
180 |
+
If you prefer a smoother spiciness that doesn't overpower the drink, you could also consider making a jalapeño-infused tequila by leaving the jalapeño slices in the bottle of tequila for several hours to a couple of days, adjusting the time based on desired level of spiciness. Then use this infused tequila instead of regular tequila in the recipe above.
|
181 |
+
|
182 |
+
Another variation is to use a spicy syrup. To make this, combine equal parts water and sugar with a few sliced jalapeños in a saucepan. Bring to a boil, stirring occasionally to dissolve the sugar. Reduce heat and simmer for about 5 minutes. Let cool, strain out the jalapeños, then store in a sealed container in the refrigerator until ready to use. Use this spicy syrup instead of regular syrup in the recipe.
|
183 |
+
|
184 |
+
As always, adjust the quantity of jalapeño or the type of chili used to suit your taste. Enjoy responsibly!
|
185 |
+
```
|
186 |
+
|