AngeloTb commited on
Commit
3639318
·
verified ·
1 Parent(s): 6f788af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,13 +5,13 @@ summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-small", tr
5
 
6
  def traslate(text):
7
  text = text.replace('"', '"')
8
- text = text.replace(''', '"')
9
  text = text.replace('&', "&")
10
  result = summarizer(text, min_length=180, truncation=True)
11
  return result[0]["summary_text"]
12
 
13
- iface = gr.interface(
14
  fn=traslate,
15
  inputs=gr.inputs.textbox(lines=10, placeholder="Enter text to summarize..."),
16
- )
17
  iface.launch()
 
5
 
6
  def traslate(text):
7
  text = text.replace('"', '"')
8
+ text = text.replace(''', "'")
9
  text = text.replace('&', "&")
10
  result = summarizer(text, min_length=180, truncation=True)
11
  return result[0]["summary_text"]
12
 
13
+ iface = gr.interface(
14
  fn=traslate,
15
  inputs=gr.inputs.textbox(lines=10, placeholder="Enter text to summarize..."),
16
+ )
17
  iface.launch()