Spaces:
Sleeping
Sleeping
romnatall
commited on
Commit
·
6fd2164
1
Parent(s):
7d4c8be
изменение весов
Browse files
app.py
CHANGED
@@ -20,8 +20,9 @@ input_search = st.text_input('Search')
|
|
20 |
tfidf_slider = st.sidebar.slider("tf_idf_description", 0.0, 1.0, 0.9)
|
21 |
tf_idf_name = st.sidebar.slider("tf_idf_name", 0.0, 1.0, 0.66)/100
|
22 |
tf_idf_actors = st.sidebar.slider("tf_idf_actors", 0.0, 1.0, 0.9)
|
23 |
-
bert_weight = st.sidebar.slider("bert_weight", 0.0, 1.0, 0.
|
24 |
|
|
|
25 |
|
26 |
data = np.load('data/embeddings_bert.npy')
|
27 |
|
@@ -97,7 +98,8 @@ def predict_rating(input_search,tfidf_slider,tf_idf_name,tf_idf_actors,bert_weig
|
|
97 |
+similarity_actors*tf_idf_actors
|
98 |
).reshape(-1)
|
99 |
st.session_state["pred"]=y
|
100 |
-
|
|
|
101 |
|
102 |
|
103 |
|
|
|
20 |
tfidf_slider = st.sidebar.slider("tf_idf_description", 0.0, 1.0, 0.9)
|
21 |
tf_idf_name = st.sidebar.slider("tf_idf_name", 0.0, 1.0, 0.66)/100
|
22 |
tf_idf_actors = st.sidebar.slider("tf_idf_actors", 0.0, 1.0, 0.9)
|
23 |
+
bert_weight = st.sidebar.slider("bert_weight", 0.0, 1.0, 0.5)
|
24 |
|
25 |
+
show_num = st.sidebar.slider("show_num", 1, 100, 100)
|
26 |
|
27 |
data = np.load('data/embeddings_bert.npy')
|
28 |
|
|
|
98 |
+similarity_actors*tf_idf_actors
|
99 |
).reshape(-1)
|
100 |
st.session_state["pred"]=y
|
101 |
+
|
102 |
+
return top_indices(y, show_num,upsc=False)
|
103 |
|
104 |
|
105 |
|