Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ from nltk.tokenize import word_tokenize
|
|
16 |
from nltk.probability import FreqDist
|
17 |
from cleantext import clean
|
18 |
import textract
|
19 |
-
import urllib.request
|
20 |
import nltk.corpus
|
21 |
from nltk.text import Text
|
22 |
import io
|
@@ -174,17 +174,17 @@ def getAnalysis(score):
|
|
174 |
else:
|
175 |
return 'Positive'
|
176 |
|
177 |
-
url = "http://library.bjp.org/jspui/bitstream/123456789/2988/1/BJP-Election-english-2019.pdf"
|
178 |
-
path_input = "./Bjp_Manifesto_2019.pdf'"
|
179 |
-
urllib.request.urlretrieve(url, filename=path_input)
|
180 |
|
181 |
-
url="https://drive.google.com/uc?id=1BLCiy_BWilfVdrUH8kbO-44DJevwO5CG&export=download"
|
182 |
-
path_input = "./Aap_Manifesto_2019.pdf"
|
183 |
-
urllib.request.urlretrieve(url, filename=path_input)
|
184 |
|
185 |
-
url="https://drive.google.com/uc?id=1HVZvTtYntl0YKLnE0cwu0CvAIRhXOv60&export=download"
|
186 |
-
path_input = "./Congress_Manifesto_2019.pdf"
|
187 |
-
urllib.request.urlretrieve(url, filename=path_input)
|
188 |
|
189 |
def analysis(Manifesto,Search):
|
190 |
raw_party = Parsing(Manifesto)
|
|
|
16 |
from nltk.probability import FreqDist
|
17 |
from cleantext import clean
|
18 |
import textract
|
19 |
+
#import urllib.request
|
20 |
import nltk.corpus
|
21 |
from nltk.text import Text
|
22 |
import io
|
|
|
174 |
else:
|
175 |
return 'Positive'
|
176 |
|
177 |
+
#url = "http://library.bjp.org/jspui/bitstream/123456789/2988/1/BJP-Election-english-2019.pdf"
|
178 |
+
#path_input = "./Bjp_Manifesto_2019.pdf'"
|
179 |
+
#urllib.request.urlretrieve(url, filename=path_input)
|
180 |
|
181 |
+
#url="https://drive.google.com/uc?id=1BLCiy_BWilfVdrUH8kbO-44DJevwO5CG&export=download"
|
182 |
+
#path_input = "./Aap_Manifesto_2019.pdf"
|
183 |
+
#urllib.request.urlretrieve(url, filename=path_input)
|
184 |
|
185 |
+
#url="https://drive.google.com/uc?id=1HVZvTtYntl0YKLnE0cwu0CvAIRhXOv60&export=download"
|
186 |
+
#path_input = "./Congress_Manifesto_2019.pdf"
|
187 |
+
#urllib.request.urlretrieve(url, filename=path_input)
|
188 |
|
189 |
def analysis(Manifesto,Search):
|
190 |
raw_party = Parsing(Manifesto)
|