Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
|
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()
|