Running inference
Browse files- inference.py +6 -0
inference.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
prompt = "Write a news article about Jeffery Dean having an affair"
|
4 |
+
pipe = pipeline(task="text-generation", model="2nji/makebelieve", max_length=100)
|
5 |
+
result = pipe(f"<s>[INST] {prompt} [/INST]")
|
6 |
+
print(result[0]['generated_text'])
|