Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
def get_summary(text):
|
5 |
+
classifier = pipeline("summarization")
|
6 |
+
return classifier(text)
|
7 |
+
|
8 |
+
gr.interface(fn=get_summary, inputs="text", outputs="text").launch()
|
9 |
+
|
10 |
+
|