Spaces:
Runtime error
Runtime error
| # -*- coding: utf-8 -*- | |
| """app.ipynb | |
| Automatically generated by Colaboratory. | |
| Original file is located at | |
| https://colab.research.google.com/drive/1bfEMI_uZXaosL5o-R1i1eTanG9-2hP7Y | |
| *`Uma Namboothiripad Assignment #2`* | |
| """ | |
| import streamlit as st | |
| import pandas as pd | |
| import plotly.express as px | |
| import urllib | |
| st.title("Plan ahead so you know where you are going once you land in Barcelona. Choose your hotel here!") | |
| st.markdown("Barcelona has one of the highest pickpockets of any city in Europe. You better get a hotel before you go") | |
| text = st.text_input('What attributes do you want in a hotel:') | |
| n_results = st.slider('How many choices in hotels do you want?', 1,5,8) | |
| dataurl = 'https://colab.research.google.com/drive/1_sofOjXRDnId49NOup4sdiVS1E_51T-b?usp=sharing' | |
| def load_data(): | |
| data_url = urllib.request.urlopen('https://colab.research.google.com/drive/1_sofOjXRDnId49NOup4sdiVS1E_51T-b?usp=sharing') | |
| df = pd.read_csv('HotelListInBarcelona__en2019100120191005.csv') | |
| return(df) | |
| if st.button('Show Hotels'): | |
| if len(text) >50: | |
| st.write('Okay boomer, try to limit your expectations and reduce the number of characters in your search') | |
| def run(): | |
| st.subheader("Options for hotels in Barcelona") | |
| df = load_data() | |
| st.dataframe(df) | |
| if __name__ == '__main__': | |
| run() |