Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,8 @@ nltk.download('punkt')
|
|
17 |
nltk.download('stopwords')
|
18 |
nltk.download('averaged_perceptron_tagger')
|
19 |
nltk.download('averaged_perceptron_tagger_eng')
|
20 |
-
|
21 |
nltk.download('wordnet')
|
22 |
nltk.download('omw-1.4')
|
23 |
-
nltk.download('punkt_tab')
|
24 |
-
|
25 |
|
26 |
# Initialize stopwords
|
27 |
stop_words = set(stopwords.words("english"))
|
@@ -237,11 +234,11 @@ with gr.Blocks() as demo:
|
|
237 |
|
238 |
button1.click(fn=predict_en, inputs=t1, outputs=[label1, score1])
|
239 |
|
240 |
-
with gr.Tab("Paraphrasing
|
241 |
-
t2 = gr.Textbox(lines=5, label=
|
242 |
-
button2 = gr.Button("🔄 Paraphrase
|
243 |
-
|
244 |
|
245 |
-
button2.click(fn=paraphrase_and_correct, inputs=t2, outputs=
|
246 |
|
247 |
-
demo.launch(
|
|
|
17 |
nltk.download('stopwords')
|
18 |
nltk.download('averaged_perceptron_tagger')
|
19 |
nltk.download('averaged_perceptron_tagger_eng')
|
|
|
20 |
nltk.download('wordnet')
|
21 |
nltk.download('omw-1.4')
|
|
|
|
|
22 |
|
23 |
# Initialize stopwords
|
24 |
stop_words = set(stopwords.words("english"))
|
|
|
234 |
|
235 |
button1.click(fn=predict_en, inputs=t1, outputs=[label1, score1])
|
236 |
|
237 |
+
with gr.Tab("Paraphrasing and Grammar Correction"):
|
238 |
+
t2 = gr.Textbox(lines=5, label="Text", placeholder="Enter the text to paraphrase and correct grammar.")
|
239 |
+
button2 = gr.Button("🔄 Paraphrase & Correct")
|
240 |
+
t3 = gr.Textbox(lines=5, label="Output")
|
241 |
|
242 |
+
button2.click(fn=paraphrase_and_correct, inputs=t2, outputs=t3)
|
243 |
|
244 |
+
demo.launch()
|