Spaces:
Runtime error
Runtime error
EnzoBustos
commited on
Commit
•
0a9468c
1
Parent(s):
070bdf1
Update app.py
Browse files
app.py
CHANGED
@@ -33,10 +33,10 @@ def sentiment_vader(text):
|
|
33 |
return overall_sentiment.upper()
|
34 |
|
35 |
def classify_by_company(text):
|
36 |
-
path = os.path.dirname(os.path.realpath(__file__)) + "
|
37 |
|
38 |
for filename in os.listdir(path):
|
39 |
-
with open(path + '
|
40 |
companies = [word[:-1] for word in f.readlines()]
|
41 |
companies = "|".join(companies)
|
42 |
companies = "/" + companies + "/gm"
|
|
|
33 |
return overall_sentiment.upper()
|
34 |
|
35 |
def classify_by_company(text):
|
36 |
+
path = os.path.dirname(os.path.realpath(__file__)) + "/Companies"
|
37 |
|
38 |
for filename in os.listdir(path):
|
39 |
+
with open(path + '/' + filename, 'r') as f:
|
40 |
companies = [word[:-1] for word in f.readlines()]
|
41 |
companies = "|".join(companies)
|
42 |
companies = "/" + companies + "/gm"
|