shrut27 commited on
Commit
af5e001
1 Parent(s): f361971

Upload 5 files

Browse files
Files changed (5) hide show
  1. Procfile +1 -0
  2. app.py +46 -0
  3. recommendations.csv +21 -0
  4. requirements.txt +19 -0
  5. setup.sh +7 -0
Procfile ADDED
@@ -0,0 +1 @@
 
 
1
+ web: sh setup.sh && streamlit run app.py
app.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import folium
4
+ from streamlit_folium import folium_static
5
+
6
+ def main():
7
+ st.title("Place Recommender System")
8
+ st.write("Please enter your trip information below:")
9
+
10
+ # use columns to display the inputs and map/recommendations side by side
11
+ col1, col2 = st.columns(2)
12
+ with col1:
13
+ destination = st.text_input("Destination")
14
+ category = st.selectbox("Category",('Beach', 'Market', 'Park', 'Tourist place', 'Temple', 'Museum', 'Cafe'))
15
+ st.write(f"Destination: {destination}")
16
+ st.write(f"Category: {category}")
17
+
18
+ # load recommendations data
19
+ recommendations = pd.read_csv('recommendations.csv')
20
+
21
+ # filter recommendations based on user input
22
+ filtered_recommendations = recommendations[(recommendations['Destination'] == destination) &
23
+ (recommendations['Category'] == category)]
24
+
25
+ # display recommendations on map
26
+ map_center = filtered_recommendations[['Latitude', 'Longitude']].mean().values.tolist()
27
+ my_map = folium.Map(location=map_center, zoom_start=12, tiles='OpenStreetMap')
28
+ for _, row in filtered_recommendations.iterrows():
29
+ folium.Marker([row['Latitude'], row['Longitude']],
30
+ popup=row['Name'],
31
+ tooltip=row['Name']).add_to(my_map)
32
+
33
+ with col2:
34
+ st.write("Here are some recommendations on a map:")
35
+ folium_static(my_map)
36
+
37
+ # display recommendations in a list
38
+ st.write("Here are some recommendations:")
39
+ table = filtered_recommendations[['Name','Description','Reviews','Google Rating(out of 5)']]
40
+ table_html = table.to_html(index=False, escape=False)
41
+ st.write(table_html, unsafe_allow_html=True)
42
+
43
+ if __name__ == "__main__":
44
+ main()
45
+
46
+
recommendations.csv ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Name,Category,Destination,Description,Latitude,Longitude,Reviews,Google Rating(out of 5)
2
+ Haeundae Beach,Beach,Busan,"This is Busan's most famous and busiest beach, with a long stretch of golden sand and crystal-clear waters.",35.1575188,129.1569029,https://www.tripadvisor.com/ShowUserReviews-g297884-d1458553-r528850563-Haeundae_Beach-Busan.html,4.6
3
+ Gwangalli Beach,Beach,Busan,"This beach is a bit quieter than Haeundae Beach, and it's a great place to watch the sunset and enjoy some street food.",35.1507619,129.1165771,https://www.google.co.kr/travel/entity/key/ChcI-63I7JSc_Lb_ARoKL20vMDNocDl5YxAE/reviews?hl=en&gl=kr&gsas=1&sa=X&utm_campaign=sharing&utm_medium=link&utm_source=htls&ts=CAESABoECgIaACoECgAaAA&rp=OAFIAg&ap=MAAhttps://www.google.co.kr/travel/entity/key/ChcI-63I7JSc_Lb_ARoKL20vMDNocDl5YxAE/reviews?hl=en&gl=kr&gsas=1&sa=X&utm_campaign=sharing&utm_medium=link&utm_source=htls&ts=CAESABoECgIaACoECgAaAA&rp=OAFIAg&ap=MAA,4.6
4
+ Songdo Beach,Beach,Busan,"This beach is located in the western part of Busan and is known for its cable car and skywalk, which offer stunning views of the ocean and city.",35.07548865,129.0172425,https://www.tripadvisor.co.nz/ShowUserReviews-g297884-d3420565-r488617643-Songdo_Beach-Busan.html,4.4
5
+ Jagalchi Fish Market,Market,Busan,"This market is one of the largest fish markets in Korea, and it offers a unique glimpse into the daily lives of Busan's fishermen.",35.0967974,129.0312173,https://www.tripadvisor.com/ShowUserReviews-g297884-d1372972-r649881527-Jagalchi_Market-Busan.html,4
6
+ Gukje Market,Market,Busan,"This traditional market is located in the heart of Busan and is one of the oldest and largest markets in Korea. You can find all sorts of goods here, including clothing, accessories, and souvenirs. It's also a great place to sample some local street food.",35.1002443,129.0282442,https://www.trip.com/travel-guide/attraction/busan/gukje-market-61926630/,4.1
7
+ Taejongdae,Park,Busan,"This scenic park is located on the southernmost tip of Yeongdo-gu, and it offers stunning views of the ocean and cliffs.",37.646103,127.008232,https://www.tripadvisor.ca/Attraction_Review-g297884-d1552284-Reviews-Taejongdae-Busan.html,4.3
8
+ Yongdusan Park,Park,Busan,"This park is located in the heart of Busan and is home to several attractions, including a large bell and a statue of Admiral Yi Sun-sin.",35.097,129.0081,https://www.trip.com/travel-guide/review-attraction/yongdusan-park-78840/159826903/,4.3
9
+ Gamcheon Culture Village,Tourist place,Busan,"This picturesque hillside village is known for its colorful houses and narrow streets, and it has become a popular tourist attraction in recent years.",35.096337,129.00879,https://www.tripadvisor.com/ShowUserReviews-g297884-d3901349-r259533099-Busan_Gamcheon_Culture_Village-Busan.html,4.3
10
+ Busan Tower,Tourist place,Busan,This 120-meter-high tower offers panoramic views of the city and is a popular spot for tourists to take photos.,35.097,129.0081,https://www.trip.com/travel-guide/attraction/busan/diamond-tower-10521758/,4.2
11
+ Dongbaek Island,Tourist place,Busan,"This small island is located at the southern end of Haeundae Beach and is a popular spot for hiking and enjoying the scenic views. It's also home to the Nurimaru APEC House, which hosted the APEC summit in 2005.",35.097,129.0081,https://www.tripadvisor.ca/Attraction_Review-g297884-d21298858-Reviews-Dongbaekseom-Busan.html,4.5
12
+ Busan International Film Festival,Tourist place,Busan,This annual film festival is held in October and is one of the most prestigious film festivals in Asia. It's a great opportunity to see some of the latest and greatest films from around the world.,35.159848,128.971854,https://www.trip.com/travel-guide/attraction/busan/busan-international-movie-festival-39464748/,4
13
+ Beomeosa Temple,Temple,Busan,This ancient temple is one of the most important Buddhist temples in Korea and is famous for its beautiful architecture and serene atmosphere.,35.282039,129.06709,https://www.tripadvisor.com/ShowUserReviews-g297884-d615908-r147587646-Beomeosa_Temple-Busan.html,4.6
14
+ Haedong Yonggungsa Temple,Temple,Busan,This beautiful temple is located on a cliff overlooking the ocean and is one of the few seaside temples in Korea. It's known for its stunning architecture and serene atmosphere.,35.192335,129.220446,https://www.trip.com/travel-guide/attraction/busan/haedong-yonggung-temple-89364/,4.4
15
+ Busan Museum,Museum,Busan,This museum is located in the heart of the city and showcases the history and culture of Busan. It's a great place to learn about the city's past and present.,35.129326,129.094185,https://www.trip.com/travel-guide/attraction/busan/busan-museum-22950940/,4
16
+ Busan Modern History Museum,Museum,Busan,This museum is located in a historic building that was once the Busan branch of the Bank of Korea. It showcases the history of Busan from the late 19th century to the present day.,35.103109,129.02615,https://www.trip.com/travel-guide/attraction/busan/busan-modern-history-museum-13640797/,4.2
17
+ Coffee Mandalay,Cafe,Busan,"This trendy café is known for its Instagram-worthy drinks, including their signature dalgona coffee. The café is located near Haeundae Beach and has a cozy atmosphere.",35.097,129.0081,https://www.tripadvisor.com/ShowUserReviews-g297884-d6352878-r255535759-Coffee_Mandalay-Busan.html,4.3
18
+ Gorilla Brewing,Cafe,Busan,This café is located in the heart of Seomyeon and is known for its high-quality coffee and friendly service. They also offer a wide selection of pastries and baked goods.,35.143904,129.109705,https://www.tripadvisor.ca/Restaurant_Review-g297884-d9981909-Reviews-Gorilla_Brewing_Co-Busan.html,4.4
19
+ Pascucci,Cafe,Busan,This Italian coffee chain has several locations throughout Busan and is known for its high-quality coffee and pastries. They also offer a variety of sandwiches and salads.,35.097,129.0081,https://www.tripadvisor.ca/Restaurant_Review-g297884-d8587791-Reviews-Caffe_Pascucci_Haeundae-Busan.html,4.2
20
+ Werk Roasters,Cafe,Busan,"This café is located near Haeundae Beach and is known for its stylish interior and excellent coffee. They roast their own coffee beans in-house, and they have a selection of pastries and desserts.",35.157283,129.074502,https://restaurantguru.com/WERK-Busan,4.4
21
+ Bricks Coffee,Cafe,Busan,"This café is located in the picturesque neighborhood of Dongnae and is known for its industrial-chic interior and excellent coffee. They have a selection of pastries and sandwiches, as well as a small outdoor seating area.",35.159162,129.058563,https://restaurantguru.com/Bricks-Coffee-Busan,4
requirements.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ altair==4.2.0
2
+ ecos==2.0.10
3
+ entrypoints==0.4
4
+ folium==0.14.0
5
+ GitPython==3.1.29
6
+ google==3.0.0
7
+ google-auth==2.17.2
8
+ google-auth-oauthlib==1.0.0
9
+ google-search-results==2.4.2
10
+ googletrans==4.0.0rc1
11
+ gTTS==2.3.1
12
+ h11==0.9.0
13
+ h2==3.2.0
14
+ huggingface-hub==0.13.3
15
+ ipython==8.5.0
16
+ streamlit==1.16.0
17
+ streamlit-nightly
18
+ streamlit-folium
19
+
setup.sh ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ mkdir -p ~/.streamlit
2
+
3
+ echo "[server]
4
+ headless = true
5
+ port = $PORT
6
+ enableCORS = false
7
+ " > ~/.streamlit/config.toml