File size: 1,236 Bytes
e30e0ca
 
 
f26568a
 
 
 
 
 
 
 
e30e0ca
d2b2ee3
 
 
 
 
 
 
 
 
 
e30e0ca
f26568a
 
e30e0ca
f26568a
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
26
27
28
import gradio as gr
from transformers import pipeline

def deine_funktion(inputs):
    # Ihre Implementierung hier. Zum Beispiel:
    model = pipeline("text-generation")
    generated_text = model(inputs)[0]["generated_text"]
    return generated_text

dein_input = gr.inputs.Textbox(lines=5, label="Your Input Here")
dein_output = gr.outputs.Textbox(label="Generated Text")

title = "Prompt Dich weiter mit Einfach.Prompt"
description = """
<p>
<center>
Big THX at Merve for this great and first Modell by 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'>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>"

iface = gr.Interface(fn=deine_funktion, inputs=dein_input, outputs=dein_output, title=title, description=description, article=article)
iface.theme = './style.css'  # Der Pfad zu Ihrer CSS-Datei

iface.launch(share=True)  # Startet das Interface und gibt eine öffentliche URL aus, die Sie teilen können