london_hotels / app.py
nlovoldegar's picture
Update app.py
f089c45
# -*- coding: utf-8 -*-
"""[Nicole_Lovold_Egar]Assignment 2.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1j5EomK04JF-H3FM_TdzSDk_US55nJd36?authuser=1#scrollTo=yPBTmhHvcyNk
"""
import streamlit as st
import pandas as pd
import plotly.express as px
import urllib
st.title("Rest Easy! Find your London Hotel")
st.markdown("In just a few moments, you'll find the place that fits all your needs")
text = st.text_input('Please describe what you are looking for in a hotel:')
n_results = st.slider('How many hotel results would you like to see?', 1,5,3)
# dataurl = 'https://colab.research.google.com/drive/1j5EomK04JF-H3FM_TdzSDk_US55nJd36?authuser=1#scrollTo=yPBTmhHvcyNk'
@st.cache(persist=True)
def load_data():
# data_url = urllib.request.urlopen('https://colab.research.google.com/drive/1j5EomK04JF-H3FM_TdzSDk_US55nJd36?authuser=1#scrollTo=yPBTmhHvcyNk')
df = pd.read_csv('HotelListInLondon__en2019100120191005.csv')
return(df)
if st.button('Show Hotels'):
if len(text) <10:
st.write('Please describe your ideal hotel in greater detail')
def run():
st.subheader("Your hotels")
df = load_data()
st.dataframe(df)
#st.table(df)
#st.write(df)
if __name__ == '__main__':
run()