makanaiii commited on
Commit
e2b89c8
1 Parent(s): 0e53944

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !pip install transformers
2
+ !pip install gradio
3
+ from transformers import pipeline
4
+ import gradio as gr
5
+
6
+ pipe("The tower is 324 metres (1,063 ft) tall,
7
+ about the same height as an 81-storey building, and the tallest structure in Paris.
8
+ Its base is square, measuring 125 metres (410 ft) on each side. During its construction,
9
+ the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world,
10
+ a title it held for 41 years until the Chrysler Building in New York City was finished in 1930.
11
+ It was the first structure to reach a height of 300 metres.
12
+ Due to the addition of a broadcasting aerial at the top of the tower in 1957,
13
+ it is now taller than the Chrysler Building by 5.2 metres (17 ft).
14
+ Excluding transmitters,
15
+ the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.")
16
+
17
+ gr.Interface.load("models/sshleifer/distilbart-cnn-12-6",
18
+
19
+ inputs=gr.Textbox(lines=5, label="Put what you want to summarise below"),
20
+ outputs=gr.Textbox(label="Result", lines=3),
21
+ title="Text summarization with Makana Boys"
22
+
23
+ ).launch(share = True)