Update app.py
Browse files
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
|
8 |
-
grammar_correction_pipe = pipeline("text2text-generation", model="pszemraj/
|
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):
|