rayl-aoit commited on
Commit
46625ac
·
verified ·
1 Parent(s): b2b5e7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -155,7 +155,7 @@ with playground:
155
  ## Text Summarization and Translation
156
  ### Summarize the paragraph and translate it into other language.
157
  - pipeline: summarization, model: [sshleifer/distilbart-cnn-12-6](https://huggingface.co/sshleifer/distilbart-cnn-12-6)
158
- - pipeline: translation, model: [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr)
159
  """)
160
 
161
  with gr.Column(scale=1):
@@ -164,7 +164,7 @@ with playground:
164
 
165
  with gr.Row():
166
  with gr.Column():
167
- source_text = gr.Textbox(label="Text to summarize", lines=13)
168
  with gr.Column():
169
  summary_textoutput = gr.Textbox(lines=3, placeholder="", label="Text Summarization")
170
  target_language_dropdown = gr.Dropdown( choices=["Chinese", "French", "Spanish"],
@@ -178,7 +178,7 @@ with playground:
178
  gr.Examples(
179
  examples=[
180
  ["The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.","French"],
181
- ["Tower Bridge is a Grade I listed combined bascule, suspension, and, until 1960, cantilever bridge[1] in London, built between 1886 and 1894, designed by Horace Jones and engineered by John Wolfe Barry with the help of Henry Marc Brunel.[2] It crosses the River Thames close to the Tower of London and is one of five London bridges owned and maintained by the City Bridge Foundation, a charitable trust founded in 1282. The bridge was constructed to connect the 39 per cent of London's population that lived east of London Bridge, while allowing shipping to access the Pool of London between the Tower of London and London Bridge. The bridge was opened by Edward, Prince of Wales and Alexandra, Princess of Wales on 30 June 1894.","French"]
182
  ],
183
  inputs=[source_text, target_language_dropdown],
184
  outputs=[summary_textoutput, translated_textbox],
 
155
  ## Text Summarization and Translation
156
  ### Summarize the paragraph and translate it into other language.
157
  - pipeline: summarization, model: [sshleifer/distilbart-cnn-12-6](https://huggingface.co/sshleifer/distilbart-cnn-12-6)
158
+ - pipeline: translation, model: [Helsinki-NLP/opus-mt-en-{target](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr)
159
  """)
160
 
161
  with gr.Column(scale=1):
 
164
 
165
  with gr.Row():
166
  with gr.Column():
167
+ source_text = gr.Textbox(label="Text to summarize", lines=18)
168
  with gr.Column():
169
  summary_textoutput = gr.Textbox(lines=3, placeholder="", label="Text Summarization")
170
  target_language_dropdown = gr.Dropdown( choices=["Chinese", "French", "Spanish"],
 
178
  gr.Examples(
179
  examples=[
180
  ["The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.","French"],
181
+ ["Tower Bridge is a Grade I listed combined bascule, suspension, and, until 1960, cantilever bridge in London, built between 1886 and 1894, designed by Horace Jones and engineered by John Wolfe Barry with the help of Henry Marc Brunel. It crosses the River Thames close to the Tower of London and is one of five London bridges owned and maintained by the City Bridge Foundation, a charitable trust founded in 1282. The bridge was constructed to connect the 39 per cent of London's population that lived east of London Bridge, while allowing shipping to access the Pool of London between the Tower of London and London Bridge. The bridge was opened by Edward, Prince of Wales and Alexandra, Princess of Wales on 30 June 1894.","Chinese"]
182
  ],
183
  inputs=[source_text, target_language_dropdown],
184
  outputs=[summary_textoutput, translated_textbox],