sashtech commited on
Commit
d45f7be
·
verified ·
1 Parent(s): 5995d1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
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 and Grammar Correction"):
239
- t2 = gr.Textbox(lines=5, label="Text", placeholder="Enter the text to paraphrase and correct grammar.")
240
- button2 = gr.Button("🔄 Paraphrase & Correct")
241
- t3 = gr.Textbox(lines=5, label="Output")
242
 
243
- button2.click(fn=paraphrase_and_correct, inputs=t2, outputs=t3)
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)