Spaces:
Running
Running
Yew Chong
commited on
Commit
·
79ebb2c
1
Parent(s):
15cf29b
UI update
Browse files- Data/cache.pkl +3 -0
- README.md +1 -0
- main.py → app.py +0 -0
- model.py +1 -1
- templates/index.html +1 -0
Data/cache.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:20c0a6050889d0c37898372ccca40e2df3f2bd10cb72c79a01e76bd9270e372e
|
3 |
+
size 860975
|
README.md
CHANGED
@@ -31,6 +31,7 @@ we will submit a representative subset of the data.
|
|
31 |
|
32 |
Start the interface with `python -m flask run`.
|
33 |
|
|
|
34 |
|
35 |
## Source Code
|
36 |
Codes are stored under `./Books` as `.ipynb` files, and named according to the order they should be run.
|
|
|
31 |
|
32 |
Start the interface with `python -m flask run`.
|
33 |
|
34 |
+
If for some reason app does not start, try running `python app.py`.
|
35 |
|
36 |
## Source Code
|
37 |
Codes are stored under `./Books` as `.ipynb` files, and named according to the order they should be run.
|
main.py → app.py
RENAMED
File without changes
|
model.py
CHANGED
@@ -70,7 +70,7 @@ class Model:
|
|
70 |
{'current_user': chosen_book_ids}
|
71 |
)
|
72 |
|
73 |
-
def prepare_predictions(self, target_users_and_books
|
74 |
"""
|
75 |
Given a dictionary of user_id to list[book_id], where the list of book IDs are the books favored by
|
76 |
the associated user, this function returns the recommended books for each user provided in the dictionary
|
|
|
70 |
{'current_user': chosen_book_ids}
|
71 |
)
|
72 |
|
73 |
+
def prepare_predictions(self, target_users_and_books):
|
74 |
"""
|
75 |
Given a dictionary of user_id to list[book_id], where the list of book IDs are the books favored by
|
76 |
the associated user, this function returns the recommended books for each user provided in the dictionary
|
templates/index.html
CHANGED
@@ -10,6 +10,7 @@
|
|
10 |
<h1>Book Recommendation System</h1>
|
11 |
<p>Welcome! You can access the options below:</p>
|
12 |
<a href="/test_users" class="btn btn-primary">Go to Test User Set</a>
|
|
|
13 |
</div>
|
14 |
<!-- Bootstrap JS (Optional) -->
|
15 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
|
|
10 |
<h1>Book Recommendation System</h1>
|
11 |
<p>Welcome! You can access the options below:</p>
|
12 |
<a href="/test_users" class="btn btn-primary">Go to Test User Set</a>
|
13 |
+
<p>Please be patient.... this usually takes a minute or two</p>
|
14 |
</div>
|
15 |
<!-- Bootstrap JS (Optional) -->
|
16 |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|