Spaces:
Sleeping
Sleeping
MohamedMotaz
commited on
Commit
•
95e3db5
1
Parent(s):
9e80610
Adding app file
Browse files
app.py
CHANGED
@@ -143,6 +143,8 @@ def download_model_from_google_drive(file_url, output_path):
|
|
143 |
# # Check if the file already exists
|
144 |
if not os.path.exists(output_path):
|
145 |
print("Downloading the similarity matrix from Googlr Drive...")
|
|
|
|
|
146 |
download_model_from_google_drive(file_url, output_path)
|
147 |
print("Download completed......")
|
148 |
|
@@ -326,6 +328,8 @@ def recommend(movie, similarity_df, movies_df, ratings_df, links_df, k=5):
|
|
326 |
def main():
|
327 |
|
328 |
movies_df, ratings_df, links_df = load_data()
|
|
|
|
|
329 |
similarity_df = load_similarity_matrix()
|
330 |
|
331 |
st.sidebar.title("Navigation")
|
|
|
143 |
# # Check if the file already exists
|
144 |
if not os.path.exists(output_path):
|
145 |
print("Downloading the similarity matrix from Googlr Drive...")
|
146 |
+
# change file permission
|
147 |
+
os.chmod('Models/similarity_matrix.pkl', 0o777)
|
148 |
download_model_from_google_drive(file_url, output_path)
|
149 |
print("Download completed......")
|
150 |
|
|
|
328 |
def main():
|
329 |
|
330 |
movies_df, ratings_df, links_df = load_data()
|
331 |
+
print("Data loaded successfully")
|
332 |
+
print("Loading similarity matrix...")
|
333 |
similarity_df = load_similarity_matrix()
|
334 |
|
335 |
st.sidebar.title("Navigation")
|