Upload 2 files
Browse files- app.py +0 -0
- 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"]
|