balaramas commited on
Commit
37d9a03
·
verified ·
1 Parent(s): 9d50c1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -12,9 +12,9 @@ from transformers import pipeline
12
  summariser = pipeline("text2text-generation", model="balaramas/mbart-enhiriser")
13
 
14
 
15
- def summarise(inp):
16
 
17
- res = summariser(inp)
18
  return res
19
 
20
  description = """
@@ -24,14 +24,11 @@ Multi-domain Summarisation Between English and Hindi
24
  </center>
25
  </p>
26
  """
27
- examples = [
28
- [" I remember when I first arrived in the United States. Even before the plane landed, the little windows in the airplane revealed snow and ice-covered houses and buildings. As I walked off the plane, cold air crept through the corrugated ramp that led to the airport terminal. Some people inside the airport were wearing big coats and hats, which I had seen on television, but never up close. I felt a little dizzy and needed to sit down, and then my cell phone rang. It was my Aunt Sophia. She was waiting for me outside in the passenger pick-up area, so I walked quickly to the exit, forgetting all about my luggage. When the sliding glass door opened to the outside, there was my aunt–a woman I hadn’t seen in over ten years–wearing a parka and waving her arms frantically in my direction.", "en->hi"]
29
- ]
30
  iface = gr.Interface(
31
  fn=summarise,
32
  inputs="text",
33
  title="🌸English to Hindi Summariser🌸",
34
- examples=examples,
35
  outputs="text")
36
 
37
  iface.launch()
 
12
  summariser = pipeline("text2text-generation", model="balaramas/mbart-enhiriser")
13
 
14
 
15
+ def summarise(Input):
16
 
17
+ res = summariser(Input)
18
  return res
19
 
20
  description = """
 
24
  </center>
25
  </p>
26
  """
27
+
 
 
28
  iface = gr.Interface(
29
  fn=summarise,
30
  inputs="text",
31
  title="🌸English to Hindi Summariser🌸",
 
32
  outputs="text")
33
 
34
  iface.launch()