karthi311 commited on
Commit
5a576c7
1 Parent(s): 6720b91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- # Load the summarization model
5
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
6
 
7
- # Use the grammar correction model via pipeline
8
- grammar_correction_pipe = pipeline("text2text-generation", model="pszemraj/flan-t5-large-grammar-synthesis")
9
 
10
  # Function for grammar correction
11
  def correct_grammar(user_input):
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Load the summarization model (facebook/bart-large-cnn)
5
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
6
 
7
+ # Use a smaller grammar correction model
8
+ grammar_correction_pipe = pipeline("text2text-generation", model="pszemraj/grammar-synthesis-small")
9
 
10
  # Function for grammar correction
11
  def correct_grammar(user_input):