Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,6 @@ if (st.button('بحث', disabled=False)):
|
|
37 |
|
38 |
if (st.button('استعمال الرسم البياني', disabled=False)):
|
39 |
|
40 |
-
tmt = {}
|
41 |
VocMap = './voc.csv'
|
42 |
ScoreMap = './BM25.csv'
|
43 |
|
@@ -66,18 +65,20 @@ if (st.button('استعمال الرسم البياني', disabled=False)):
|
|
66 |
|
67 |
L = setQueriesVoc(df_in, id_list)
|
68 |
@st.cache
|
69 |
-
def compute_score(
|
70 |
-
|
|
|
71 |
score = 0.0
|
72 |
temp = []
|
73 |
-
for ni in
|
74 |
try:
|
75 |
score = score + df_g.loc[(ni, nc),'score']
|
76 |
except KeyError:
|
77 |
continue
|
78 |
key = df3.loc[nc].values[0]
|
79 |
tmt[key] = score
|
80 |
-
|
|
|
81 |
|
82 |
tmt = compute_score(L, id_list)
|
83 |
exp_terms = []
|
|
|
37 |
|
38 |
if (st.button('استعمال الرسم البياني', disabled=False)):
|
39 |
|
|
|
40 |
VocMap = './voc.csv'
|
41 |
ScoreMap = './BM25.csv'
|
42 |
|
|
|
65 |
|
66 |
L = setQueriesVoc(df_in, id_list)
|
67 |
@st.cache
|
68 |
+
def compute_score(L_terms, id_l):
|
69 |
+
tmt = {}
|
70 |
+
for nc in L_terms:
|
71 |
score = 0.0
|
72 |
temp = []
|
73 |
+
for ni in id_l:
|
74 |
try:
|
75 |
score = score + df_g.loc[(ni, nc),'score']
|
76 |
except KeyError:
|
77 |
continue
|
78 |
key = df3.loc[nc].values[0]
|
79 |
tmt[key] = score
|
80 |
+
return tmt
|
81 |
+
|
82 |
|
83 |
tmt = compute_score(L, id_list)
|
84 |
exp_terms = []
|