AIlexDev commited on
Commit
f26568a
1 Parent(s): 4f46ed8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -1,9 +1,14 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- iface = gr.Interface(fn=deine_funktion, inputs=dein_input, outputs=dein_output)
5
- iface.theme = './style.css'
6
- iface.launch()
 
 
 
 
 
7
 
8
  title = "Prompt Dich weiter mit Einfach.Prompt"
9
  description = """
@@ -16,6 +21,7 @@ Big THX at Merve for this great and first Modell by Bart..
16
  """
17
  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>"
18
 
 
 
19
 
20
- iface.launch(share=True)
21
-
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ def deine_funktion(inputs):
5
+ # Ihre Implementierung hier. Zum Beispiel:
6
+ model = pipeline("text-generation")
7
+ generated_text = model(inputs)[0]["generated_text"]
8
+ return generated_text
9
+
10
+ dein_input = gr.inputs.Textbox(lines=5, label="Your Input Here")
11
+ dein_output = gr.outputs.Textbox(label="Generated Text")
12
 
13
  title = "Prompt Dich weiter mit Einfach.Prompt"
14
  description = """
 
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
+ iface = gr.Interface(fn=deine_funktion, inputs=dein_input, outputs=dein_output, title=title, description=description, article=article)
25
+ iface.theme = './style.css' # Der Pfad zu Ihrer CSS-Datei
26
 
27
+ iface.launch(share=True) # Startet das Interface und gibt eine öffentliche URL aus, die Sie teilen können