Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Initialize the summarization pipeline
|
5 |
-
summarizer = pipeline("summarization", model="
|
6 |
|
7 |
def summarize_text(text):
|
8 |
"""Summarizes the given text using the pre-trained model."""
|
@@ -19,7 +19,7 @@ iface = gr.Interface(
|
|
19 |
outputs=gr.Textbox(lines=5, label="Summary"),
|
20 |
title="Nepali Text Summarizer",
|
21 |
description="Enter Nepali text and get a concise summary using a pre-trained NLP model.",
|
22 |
-
flagging_mode="never"
|
23 |
)
|
24 |
|
25 |
if __name__ == "__main__":
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
# Initialize the summarization pipeline
|
5 |
+
summarizer = pipeline("summarization", model="facebook/bart-large-cnn") # You can choose other models
|
6 |
|
7 |
def summarize_text(text):
|
8 |
"""Summarizes the given text using the pre-trained model."""
|
|
|
19 |
outputs=gr.Textbox(lines=5, label="Summary"),
|
20 |
title="Nepali Text Summarizer",
|
21 |
description="Enter Nepali text and get a concise summary using a pre-trained NLP model.",
|
22 |
+
flagging_mode="never" # Changed this line
|
23 |
)
|
24 |
|
25 |
if __name__ == "__main__":
|