Update README.md
Browse files
README.md
CHANGED
@@ -21,9 +21,13 @@ pipeline = transformers.pipeline(
|
|
21 |
trust_remote_code=True,
|
22 |
device_map="auto",
|
23 |
)
|
|
|
|
|
|
|
|
|
24 |
sequences = pipeline(
|
25 |
-
|
26 |
-
max_length=
|
27 |
do_sample=True,
|
28 |
top_k=10,
|
29 |
num_return_sequences=1,
|
@@ -31,7 +35,8 @@ sequences = pipeline(
|
|
31 |
)
|
32 |
|
33 |
for seq in sequences:
|
34 |
-
generated_text =
|
35 |
-
|
|
|
36 |
|
37 |
```
|
|
|
21 |
trust_remote_code=True,
|
22 |
device_map="auto",
|
23 |
)
|
24 |
+
|
25 |
+
|
26 |
+
input_prompt = "Question: Are group 2 innate lymphoid cells ( ILC2s ) increased in chronic rhinosinusitis with nasal polyps or eosinophilia?\nAnswer:"
|
27 |
+
|
28 |
sequences = pipeline(
|
29 |
+
input_prompt,
|
30 |
+
max_length=300,
|
31 |
do_sample=True,
|
32 |
top_k=10,
|
33 |
num_return_sequences=1,
|
|
|
35 |
)
|
36 |
|
37 |
for seq in sequences:
|
38 |
+
generated_text = seq['generated_text'].split("\nQuestion:")[0]
|
39 |
+
generated_text = generated_text.replace(input_prompt, "").strip()
|
40 |
+
print(generated_text)
|
41 |
|
42 |
```
|