PrashantKhairnar
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -116,8 +116,8 @@ for seq in sequences:
|
|
116 |
|
117 |
|
118 |
# example:1 <start>
|
119 |
-
prompt="""explain to me in a simple to understand way, what is the equation for
|
120 |
-
how it can be
|
121 |
|
122 |
sequences = pipeline(
|
123 |
f'<s>[INST] {prompt} [/INST]',
|
@@ -128,10 +128,26 @@ sequences = pipeline(
|
|
128 |
max_length=400,
|
129 |
)
|
130 |
for seq in sequences:
|
131 |
-
print(f"Result: {seq['generated_text']}")
|
132 |
|
133 |
# example:1 <end>
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
```
|
136 |
|
137 |
|
|
|
116 |
|
117 |
|
118 |
# example:1 <start>
|
119 |
+
prompt="""explain to me in a simple to understand way, what is the equation for Pythagoras theorem and
|
120 |
+
how it can be proved by using only high school level math. please give each step of a proof using LaTeX."""
|
121 |
|
122 |
sequences = pipeline(
|
123 |
f'<s>[INST] {prompt} [/INST]',
|
|
|
128 |
max_length=400,
|
129 |
)
|
130 |
for seq in sequences:
|
131 |
+
print(f"Result-1: {seq['generated_text']}")
|
132 |
|
133 |
# example:1 <end>
|
134 |
|
135 |
+
# example:2 <start>
|
136 |
+
prompt="""Discuss the pros and cons of genetically modified crops and their impact on the food industry and agriculture."""
|
137 |
+
|
138 |
+
sequences = pipeline(
|
139 |
+
f'<s>[INST] {prompt} [/INST]',
|
140 |
+
do_sample=True,
|
141 |
+
top_k=10,
|
142 |
+
num_return_sequences=1,
|
143 |
+
eos_token_id=tokenizer.eos_token_id,
|
144 |
+
max_length=400,
|
145 |
+
)
|
146 |
+
for seq in sequences:
|
147 |
+
print(f"Result-2: {seq['generated_text']}")
|
148 |
+
|
149 |
+
# example:2 <end>
|
150 |
+
|
151 |
```
|
152 |
|
153 |
|