Update app.py
Browse files
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 |
-
|
| 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()
|