2nji commited on
Commit
066f089
1 Parent(s): ee90e72

Running inference

Browse files
Files changed (1) hide show
  1. 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'])