Spaces:
Sleeping
Sleeping
themeetjani
commited on
Commit
•
26bd2df
1
Parent(s):
cb4c6d3
Update pages/topic_classification.py
Browse files
pages/topic_classification.py
CHANGED
@@ -13,7 +13,7 @@ def cosine_similarity(x,y):
|
|
13 |
return 1 - spatial.distance.cosine(x,y)
|
14 |
|
15 |
# reading topic file into dataframe
|
16 |
-
df = pd.read_excel(
|
17 |
#df2 = pd.read_csv("BBC News Train.csv") #sample news article file
|
18 |
#storing level1 and level2 segments into dictinary first
|
19 |
result_dict = df.groupby('LEVEL 1')['new_level_2'].apply(list).to_dict()
|
|
|
13 |
return 1 - spatial.distance.cosine(x,y)
|
14 |
|
15 |
# reading topic file into dataframe
|
16 |
+
df = pd.read_excel('topic_data.xlsx')
|
17 |
#df2 = pd.read_csv("BBC News Train.csv") #sample news article file
|
18 |
#storing level1 and level2 segments into dictinary first
|
19 |
result_dict = df.groupby('LEVEL 1')['new_level_2'].apply(list).to_dict()
|