File size: 1,237 Bytes
702d3c0
 
e30e0ca
702d3c0
 
 
 
 
 
 
 
 
 
f26568a
e30e0ca
702d3c0
e30e0ca
702d3c0
 
 
e30e0ca
702d3c0
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 importieren Gradio  als  Gr 
aus  der Transformatoren  Importpipeline  - 

title =  "Prompt Dich weiter mit Einfach.Prompt" 
Beschreibung =  """ 
<p> 
<Mitte> 
Vielen Dank an Merve für dieses tolle und erste Modell von Bart. 
<img src="https://huggingface.co/spaces/EinfachAilex/einfach.prompt/blob/main/cover.png" alt="rick" width="250"/> 
</center> 
</p> 
„““ 
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>" 


Generator = Pipeline(  „text2text-generation“  , model=  „merve/chatgpt-prompts-bart-long“  ) 

def   generic_prompt  (  Eingabeaufforderung  ): 
Ausgabe = Generator (Eingabeaufforderung, max_length =  250  ) 
    Rückgabeausgabe  [  0  ][  'generated_text'  ] 

interface = gr.Interface(fn=generate_prompt, inputs=  "text"  , outputs=  "text"  , title=  "💯 Einfach.Prompt Generator 💯 erstellt mit "  , 
                         description= "Wunsch prompt eingeben z.b. Web Designer und einen prompt für Chat.GPT erstellen lassen" ) 

interface.launch()