Spaces:
Runtime error
Runtime error
prateekiiest
commited on
Commit
•
d0817bf
1
Parent(s):
cc58dc7
rgg
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ genre_df = pd.read_csv("ml-100k/ml-100k/u.genre",
|
|
13 |
sep="|", names=["genreName", "count"])
|
14 |
|
15 |
|
16 |
-
user_df = pd.read_csv(
|
17 |
names=["userID", "age", "gender", "occupation", "zip_code"])
|
18 |
-
movie_df = pd.read_csv(
|
19 |
|
20 |
prediction_df = pd.read_csv(r"pred.csv", sep=",")
|
21 |
|
@@ -26,7 +26,7 @@ def mappingMovie(mid):
|
|
26 |
prediction_df["Movie Title"] = prediction_df["itemID"].apply(mappingMovie)
|
27 |
|
28 |
|
29 |
-
df = pd.read_csv(
|
30 |
|
31 |
|
32 |
rating_df = df[df["rating"]>=1.0]
|
13 |
sep="|", names=["genreName", "count"])
|
14 |
|
15 |
|
16 |
+
user_df = pd.read_csv("ml-100k/ml-100k/u.user", sep="|",
|
17 |
names=["userID", "age", "gender", "occupation", "zip_code"])
|
18 |
+
movie_df = pd.read_csv("ml-100k/ml-100k/u.item", sep="|", names=["itemID", "title", "release_date", "video_release_date", "IMDb_URL", "unknown", "Action", "Adventure", "Animation", "Children's", "Comedy", "Crime", "Documentary", "Drama", "Fantasy", "Film-Noir", "Horror", "Musical", "Mystery", "Romance", "Sci-Fi", "Thriller", "War", "Western"],encoding='latin-1')
|
19 |
|
20 |
prediction_df = pd.read_csv(r"pred.csv", sep=",")
|
21 |
|
26 |
prediction_df["Movie Title"] = prediction_df["itemID"].apply(mappingMovie)
|
27 |
|
28 |
|
29 |
+
df = pd.read_csv("ml-100k/ml-100k/u.data", sep="\t", names=["userID", "itemID", "rating", "timestamp"])
|
30 |
|
31 |
|
32 |
rating_df = df[df["rating"]>=1.0]
|