knguyen471 commited on
Commit
2672c22
·
verified ·
1 Parent(s): 9da88b8

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -16,11 +16,12 @@ print("Loading restaurant data...")
16
  data = pd.read_csv("data/toy_data_aggregated_embeddings.csv")
17
  print(f"Loaded {len(data)} restaurants")
18
 
19
- # Compute Bayesian popularity scores
20
- print("Computing popularity scores...")
21
- data = compute_bayesian_popularity_score(data)
22
- print("Popularity scores computed")
23
 
 
24
  print("Loading pre-computed embeddings...")
25
  all_desc_embeddings = np.vstack(data["embedding"].values)
26
  print(f"Loaded embeddings with shape {all_desc_embeddings.shape}")
@@ -203,7 +204,10 @@ def search_restaurants(query_input, data_source, num_results):
203
  return get_recommendations(query_clean, n_candidates, num_results)
204
 
205
  # Create Gradio interface
206
- with gr.Blocks(title="Restaurant Finder", theme=gr.themes.Soft()) as app:
 
 
 
207
  gr.Markdown("""
208
  # Advanced Restaurant Recommendation System
209
  ### Search Through 5,000+ Restaurants with AI-Powered Semantic Search
 
16
  data = pd.read_csv("data/toy_data_aggregated_embeddings.csv")
17
  print(f"Loaded {len(data)} restaurants")
18
 
19
+ # # Compute Bayesian popularity scores
20
+ # print("Computing popularity scores...")
21
+ # data = compute_bayesian_popularity_score(data)
22
+ # print("Popularity scores computed")
23
 
24
+ # Load embeddings
25
  print("Loading pre-computed embeddings...")
26
  all_desc_embeddings = np.vstack(data["embedding"].values)
27
  print(f"Loaded embeddings with shape {all_desc_embeddings.shape}")
 
204
  return get_recommendations(query_clean, n_candidates, num_results)
205
 
206
  # Create Gradio interface
207
+ with gr.Blocks(
208
+ title="Restaurant Finder",
209
+ # theme=gr.themes.Soft()
210
+ ) as app:
211
  gr.Markdown("""
212
  # Advanced Restaurant Recommendation System
213
  ### Search Through 5,000+ Restaurants with AI-Powered Semantic Search