Shirish15 commited on
Commit
e55a74f
·
verified ·
1 Parent(s): 3fec680

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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="google/mt5-base") # Changed the model here
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__":