einfach.prompt / app.py
EinfachOlder's picture
Update app.py
0cb7933
import gradio as gr
from transformers import pipeline
title = "Einfach.Prompt "
description = """
<p>
<center>
<img src="https://einfachalex.net/wp-content/uploads/2023/09/a01f3ca6e3e4ece8e1a30696f52844bc.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 generate_prompt(eingabeaufforderung):
ausgabe = generator(eingabeaufforderung, max_length=250)
return ausgabe[0]['generated_text']
interface = gr.Interface(
fn=generate_prompt,
inputs="text",
outputs="text",
title=title,
description=description,
theme='NoCrypt/[email protected]',
css='style.css' # Hier wird die style.css eingebunden
)
interface.launch()