Spaces:
Sleeping
Sleeping
SerenaTOUM
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
summarizer = pipeline("summarization")
|
3 |
+
|
4 |
+
import gradio as gr
|
5 |
+
|
6 |
+
def summarization (text):
|
7 |
+
resume = summarizer(text)
|
8 |
+
return resume[0]["summary_text"]
|
9 |
+
|
10 |
+
demo = gr.Interface(summarization, title= "ET SI JE FESAIS TON RESUME?", inputs = "text", outputs = "text", description = "Donnez-moi votre texte et je vous le résume en quelques mots")
|
11 |
+
demo.launch(quiet = True)
|