xy4286 commited on
Commit
524c399
·
verified ·
1 Parent(s): 86ef270

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -1,13 +1,15 @@
 
 
1
  import gradio as gr
2
- !pip install transformers
3
- import transformers
4
- from transformers import pipeline
5
 
6
- pipe = pipeline("text2text-generation", model="xy4286/pegasus-samsum")
 
 
 
 
 
 
 
 
7
 
8
- def greet(fulltext):
9
- # return "Hello " + name + "!!"
10
- return pipe(fulltext)
11
 
12
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
13
- demo.launch()
 
1
+
2
+
3
  import gradio as gr
 
 
 
4
 
5
+ title = "summary"
6
+ description = "a summary test"
7
+
8
+ gr.Interface.load(
9
+ "huggingface/EleutherAI/gpt-j-6B",
10
+ inputs=gr.Textbox(lines=5, label="Input Text"),
11
+ title=title,
12
+ description=description,
13
+ ).launch()
14
 
 
 
 
15