jchen8000 commited on
Commit
be68997
·
verified ·
1 Parent(s): 5254954

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -52,7 +52,11 @@ def get_recommendations(title, cosine_sim=cosine_sim):
52
  # Gradio interface
53
  def recommend_movies(movie):
54
  recommendations = get_recommendations(movie)
55
- return "\n".join([f"**{title}: {score:.2f}**" for title, score in recommendations])
 
 
 
 
56
 
57
  # Create the Gradio interface
58
  movie_list = movies['title'].tolist()
 
52
  # Gradio interface
53
  def recommend_movies(movie):
54
  recommendations = get_recommendations(movie)
55
+
56
+ headers = "Title{:20}Score".format("")
57
+ return headers + "\n" + "\n".join([f"{title:<20} {score:>5.2f}" for title, score in recommendations])
58
+
59
+
60
 
61
  # Create the Gradio interface
62
  movie_list = movies['title'].tolist()