Spaces:
Runtime error
Runtime error
design changes
Browse files- Dataset/embeddingsbooks.txt +2 -2
- Dataset/faissbooks.index +2 -2
- Dataset/parcedbooks.csv +2 -2
- app.py +6 -3
- pages/recipes.py +6 -4
Dataset/embeddingsbooks.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f0d215389841d91e403e0d2052998369eefc5546e5597dbcb2b85f126679054c
|
3 |
+
size 26199019
|
Dataset/faissbooks.index
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fbeed94e0f2dbbb393b7f019d0174e2dc7861f8f2a2a3091a549b31f8bff88d7
|
3 |
+
size 8580045
|
Dataset/parcedbooks.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d3abf12900ffd5ac0b3c8f503075930830c430fc9039416ce8d7c09589f900a
|
3 |
+
size 10833072
|
app.py
CHANGED
@@ -38,10 +38,13 @@ def embed_bert_cls(text, model, tokenizer):
|
|
38 |
return embeddings[0].cpu().numpy()
|
39 |
|
40 |
|
41 |
-
|
42 |
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
if text and button:
|
|
|
38 |
return embeddings[0].cpu().numpy()
|
39 |
|
40 |
|
41 |
+
col3, col4 = st.columns([5,1])
|
42 |
|
43 |
+
with col3:
|
44 |
+
text = st.text_input('Введите ваше предпочтение для рекомендации')
|
45 |
+
with col4:
|
46 |
+
num = st.number_input('Укажите количество книг для рекомендации', step=1, value=1)
|
47 |
+
button = st.button('Отправить запрос')
|
48 |
|
49 |
|
50 |
if text and button:
|
pages/recipes.py
CHANGED
@@ -37,11 +37,13 @@ def embed_bert_cls(text, model, tokenizer):
|
|
37 |
embeddings = torch.nn.functional.normalize(embeddings)
|
38 |
return embeddings[0].cpu().numpy()
|
39 |
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
num = st.number_input('Укажите количество блюд для рекомендации', step=1, value=1)
|
|
|
45 |
|
46 |
|
47 |
if text and button:
|
|
|
37 |
embeddings = torch.nn.functional.normalize(embeddings)
|
38 |
return embeddings[0].cpu().numpy()
|
39 |
|
40 |
+
col3, col4 = st.columns([5,1])
|
41 |
|
42 |
+
with col3:
|
43 |
+
text = st.text_input('Введите ваше предпочтение для рекомендации')
|
44 |
+
with col4:
|
45 |
+
num = st.number_input('Укажите количество блюд для рекомендации', step=1, value=1)
|
46 |
+
button = st.button('Отправить запрос')
|
47 |
|
48 |
|
49 |
if text and button:
|