Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,10 +17,12 @@ nltk.download('punkt')
|
|
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 |
nltk.download('punkt_tab')
|
23 |
|
|
|
24 |
# Initialize stopwords
|
25 |
stop_words = set(stopwords.words("english"))
|
26 |
|
@@ -235,11 +237,11 @@ with gr.Blocks() as demo:
|
|
235 |
|
236 |
button1.click(fn=predict_en, inputs=t1, outputs=[label1, score1])
|
237 |
|
238 |
-
with gr.Tab("Paraphrasing
|
239 |
-
t2 = gr.Textbox(lines=5, label=
|
240 |
-
button2 = gr.Button("🔄 Paraphrase
|
241 |
-
|
242 |
|
243 |
-
button2.click(fn=paraphrase_and_correct, inputs=t2, outputs=
|
244 |
|
245 |
-
demo.launch()
|
|
|
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"))
|
28 |
|
|
|
237 |
|
238 |
button1.click(fn=predict_en, inputs=t1, outputs=[label1, score1])
|
239 |
|
240 |
+
with gr.Tab("Paraphrasing & Grammar Correction"):
|
241 |
+
t2 = gr.Textbox(lines=5, label='Enter text for paraphrasing and grammar correction')
|
242 |
+
button2 = gr.Button("🔄 Paraphrase and Correct")
|
243 |
+
result2 = gr.Textbox(lines=5, label='Corrected Text')
|
244 |
|
245 |
+
button2.click(fn=paraphrase_and_correct, inputs=t2, outputs=result2)
|
246 |
|
247 |
+
demo.launch(share=True)
|