romnatall commited on
Commit
54121dd
1 Parent(s): b232e50

модель для актеров изменена по биграммы

Browse files
app.py CHANGED
@@ -19,7 +19,7 @@ input_search = st.text_input('Search')
19
 
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.0083)
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.9)
24
 
25
 
@@ -227,10 +227,6 @@ def getnums(df,size=0,text=''):
227
  return reqs[text]
228
 
229
 
230
-
231
-
232
-
233
-
234
  if input_search:
235
  for i in predict_rating(input_search,tfidf_slider,tf_idf_name,tf_idf_actors,bert_weight):
236
  display_movie_card(movies, i )
 
19
 
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.0083)
22
+ tf_idf_actors = st.sidebar.slider("tf_idf_actors", 0.0, 1.0, 0.9)*10
23
  bert_weight = st.sidebar.slider("bert_weight", 0.0, 1.0, 0.9)
24
 
25
 
 
227
  return reqs[text]
228
 
229
 
 
 
 
 
230
  if input_search:
231
  for i in predict_rating(input_search,tfidf_slider,tf_idf_name,tf_idf_actors,bert_weight):
232
  display_movie_card(movies, i )
data/books_model (2).ipynb CHANGED
@@ -388,11 +388,11 @@
388
  },
389
  {
390
  "cell_type": "code",
391
- "execution_count": 10,
392
  "metadata": {},
393
  "outputs": [],
394
  "source": [
395
- "vectorizer = TfidfVectorizer(ngram_range=(1, 2))\n",
396
  "a=vectorizer.fit_transform(data['actors'].fillna(''))\n"
397
  ]
398
  },
@@ -459,7 +459,7 @@
459
  },
460
  {
461
  "cell_type": "code",
462
- "execution_count": 11,
463
  "metadata": {},
464
  "outputs": [],
465
  "source": [
 
388
  },
389
  {
390
  "cell_type": "code",
391
+ "execution_count": 16,
392
  "metadata": {},
393
  "outputs": [],
394
  "source": [
395
+ "vectorizer = TfidfVectorizer(ngram_range=(2, 2), sublinear_tf=True)\n",
396
  "a=vectorizer.fit_transform(data['actors'].fillna(''))\n"
397
  ]
398
  },
 
459
  },
460
  {
461
  "cell_type": "code",
462
+ "execution_count": 17,
463
  "metadata": {},
464
  "outputs": [],
465
  "source": [
data/vectorizer_actors.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:afe1032cfedea73140c67f1b1480bd24ceefa0087b015aa86ed091d80517eb07
3
- size 19423397
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f91f10d57cc9977375956d315bc58d81a09b5d4433b52df38481dd5ed3614d15
3
+ size 16325508