John6666 commited on
Commit
44b7702
1 Parent(s): b69cc72

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +0 -0
  2. prompt_extend.py +6 -0
app.py CHANGED
The diff for this file is too large to render. See raw diff
 
prompt_extend.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ pipe = pipeline('text-generation', model='daspartho/prompt-extend')
4
+
5
+ def extend_prompt(prompt):
6
+ return pipe(prompt+',', num_return_sequences=1)[0]["generated_text"]