antfraia commited on
Commit
03ea6cd
·
1 Parent(s): 745d383

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -51,7 +51,8 @@ if website_name:
51
  if day_data:
52
  hours = [entry['hour'] for entry in day_data]
53
  occupancy = [entry['occupancyPercent'] for entry in day_data]
54
- st.bar_chart(pd.Series(occupancy, index=hours), use_container_width=True, title=day)
 
55
 
56
  # Review Count and Distribution
57
  st.subheader("Review Count and Distribution")
@@ -64,8 +65,11 @@ if website_name:
64
  # Reviews Table
65
  st.subheader("Customer Reviews")
66
  reviews = google_maps_data.get('reviews', [])
67
- review_df = pd.DataFrame(reviews)
68
- st.table(review_df[['name', 'text', 'publishAt', 'likesCount', 'stars']])
 
 
 
69
 
70
  else:
71
  st.write("No results found for this website / company name on Google Maps.")
 
51
  if day_data:
52
  hours = [entry['hour'] for entry in day_data]
53
  occupancy = [entry['occupancyPercent'] for entry in day_data]
54
+ st.write(day)
55
+ st.bar_chart(pd.Series(occupancy, index=hours), use_container_width=True)
56
 
57
  # Review Count and Distribution
58
  st.subheader("Review Count and Distribution")
 
65
  # Reviews Table
66
  st.subheader("Customer Reviews")
67
  reviews = google_maps_data.get('reviews', [])
68
+ if reviews:
69
+ review_df = pd.DataFrame(reviews)
70
+ st.table(review_df[['name', 'text', 'publishAt', 'likesCount', 'stars']])
71
+ else:
72
+ st.write("No reviews available.")
73
 
74
  else:
75
  st.write("No results found for this website / company name on Google Maps.")