Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,27 +1,25 @@
|
|
1 |
-
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
dein_input = gr.inputs.Textbox(lines=5, label="Your Input Here")
|
11 |
-
dein_output = gr.outputs.Textbox(label="Generated Text")
|
12 |
|
13 |
-
|
14 |
-
description = """
|
15 |
-
<p>
|
16 |
-
<center>
|
17 |
-
Big THX at Merve for this great and first Modell by Bart..
|
18 |
-
<img src="https://huggingface.co/spaces/EinfachAilex/einfach.prompt/blob/main/cover.png" alt="rick" width="250"/>
|
19 |
-
</center>
|
20 |
-
</p>
|
21 |
-
"""
|
22 |
-
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>"
|
23 |
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
1 |
+
importieren Gradio als Gr
|
2 |
+
aus der Transformatoren Importpipeline -
|
3 |
|
4 |
+
title = "Prompt Dich weiter mit Einfach.Prompt"
|
5 |
+
Beschreibung = """
|
6 |
+
<p>
|
7 |
+
<Mitte>
|
8 |
+
Vielen Dank an Merve für dieses tolle und erste Modell von 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'>Rezepte zum Erstellen eines Open-Domain-Chatbots</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 generic_prompt ( Eingabeaufforderung ):
|
19 |
+
Ausgabe = Generator (Eingabeaufforderung, max_length = 250 )
|
20 |
+
Rückgabeausgabe [ 0 ][ 'generated_text' ]
|
21 |
|
22 |
+
interface = gr.Interface(fn=generate_prompt, inputs= "text" , outputs= "text" , title= "💯 Einfach.Prompt Generator 💯 erstellt mit " ,
|
23 |
+
description= "Wunsch prompt eingeben z.b. Web Designer und einen prompt für Chat.GPT erstellen lassen" )
|
24 |
+
|
25 |
+
interface.launch()
|