sashtech commited on
Commit
753a7d6
·
verified ·
1 Parent(s): a1e232c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
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 & 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)
 
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()