amanscoder commited on
Commit
e6712cd
·
1 Parent(s): 5b364fd

updated app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,8 @@ import nltk
6
  from nltk.stem import PorterStemmer
7
  from nltk.tokenize import word_tokenize
8
  import numpy as np
9
-
 
10
 
11
 
12
  def text_preprocessing(df):
@@ -56,4 +57,4 @@ def paragraph_processing_app(paragraph):
56
  input_text = gr.Textbox(lines=10, label="Enter a article:")
57
  output_text = gr.Textbox(label="Category(Out of Business, Tech, Sport, Politics and Entertainment.)")
58
 
59
- gr.Interface(fn=paragraph_processing_app, inputs=input_text, outputs=output_text).launch()
 
6
  from nltk.stem import PorterStemmer
7
  from nltk.tokenize import word_tokenize
8
  import numpy as np
9
+ nltk.download('punkt')
10
+ nltk.download('stopwords')
11
 
12
 
13
  def text_preprocessing(df):
 
57
  input_text = gr.Textbox(lines=10, label="Enter a article:")
58
  output_text = gr.Textbox(label="Category(Out of Business, Tech, Sport, Politics and Entertainment.)")
59
 
60
+ gr.Interface(fn=paragraph_processing_app, inputs=input_text, outputs=output_text).launch(share=True)