Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
|
| 4 |
-
title =
|
| 5 |
-
|
| 6 |
-
<p>
|
| 7 |
-
<
|
| 8 |
-
|
| 9 |
-
<img src="https://huggingface.co/spaces/EinfachAilex/einfach.prompt/blob/main/cover.png" alt="rick" width="250"/>
|
| 10 |
-
</center>
|
| 11 |
-
</p>
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
def
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
-
interface = gr.Interface(fn=generate_prompt, inputs=
|
| 23 |
-
description=
|
| 24 |
|
| 25 |
-
interface.launch()
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
|
| 4 |
+
title = "Prompt Dich weiter mit Einfach.Prompt"
|
| 5 |
+
description = """
|
| 6 |
+
<p>
|
| 7 |
+
<center>
|
| 8 |
+
Big THX at Merve for this great and first Modell by Bart..
|
| 9 |
+
<img src="https://huggingface.co/spaces/EinfachAilex/einfach.prompt/blob/main/cover.png" alt="rick" width="250"/>
|
| 10 |
+
</center>
|
| 11 |
+
</p>
|
| 12 |
+
"""
|
| 13 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1907.06616' target='_blank'>Recipes for building an open-domain chatbot</a></p><p style='text-align: center'><a href='https://parl.ai/projects/recipes/' target='_blank'>Original PARLAI Code</a></p></center></p>"
|
| 14 |
|
| 15 |
|
| 16 |
+
generator = pipeline("text2text-generation", model="merve/chatgpt-prompts-bart-long")
|
| 17 |
|
| 18 |
+
def generate_prompt(prompt):
|
| 19 |
+
output = generator(prompt, max_length=250)
|
| 20 |
+
return output[0]['generated_text']
|
| 21 |
|
| 22 |
+
interface = gr.Interface(fn=generate_prompt, inputs="text", outputs="text", title="💯 Einfach.Prompt Generator 💯 made with ",
|
| 23 |
+
description="Wunsch prompt eingeben z.b. Web Designer und einen prompt für Chat.GPT erstellen lassen")
|
| 24 |
|
| 25 |
+
interface.launch()
|