fixed local variable
Browse files
app.py
CHANGED
@@ -127,9 +127,6 @@ def get_topic_value(row, i):
|
|
127 |
else:
|
128 |
return row[i][1]
|
129 |
|
130 |
-
|
131 |
-
df = pd.DataFrame()
|
132 |
-
|
133 |
def dataframeProcessing(dataset):
|
134 |
# Opening JSON file
|
135 |
f = open('stopwords-tl.json')
|
@@ -138,6 +135,7 @@ def dataframeProcessing(dataset):
|
|
138 |
stopwords.update(tlStopwords)
|
139 |
stopwords.update(['na', 'sa', 'ko', 'ako', 'ng', 'mga', 'ba', 'ka', 'yung', 'lang', 'di', 'mo', 'kasi'])
|
140 |
|
|
|
141 |
df = pd.read_csv('katip-december.csv')
|
142 |
df.rename(columns = {'tweet':'original_tweets'}, inplace = True)
|
143 |
df = df.apply(lambda row: row[df['language'].isin(['en'])])
|
|
|
127 |
else:
|
128 |
return row[i][1]
|
129 |
|
|
|
|
|
|
|
130 |
def dataframeProcessing(dataset):
|
131 |
# Opening JSON file
|
132 |
f = open('stopwords-tl.json')
|
|
|
135 |
stopwords.update(tlStopwords)
|
136 |
stopwords.update(['na', 'sa', 'ko', 'ako', 'ng', 'mga', 'ba', 'ka', 'yung', 'lang', 'di', 'mo', 'kasi'])
|
137 |
|
138 |
+
global df
|
139 |
df = pd.read_csv('katip-december.csv')
|
140 |
df.rename(columns = {'tweet':'original_tweets'}, inplace = True)
|
141 |
df = df.apply(lambda row: row[df['language'].isin(['en'])])
|