supernovamutinda commited on
Commit
c16d73a
β€’
1 Parent(s): b5316f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -2
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import streamlit as st
 
2
  import pandas as pd
3
  import numpy as np
4
 
5
 
6
-
7
  with st.sidebar:
8
  st.image("https://www.onepointltd.com/wp-content/uploads/2020/03/inno2.png")
9
  st.title("Samuel's Portfolio")
10
- choice = st.radio("Navigation", ["About Sam","Uber Project","Attached files", "Contact"])
11
  st.info("This project application helps you understand more about Samuel and his capabilities in detail.")
12
 
13
  if choice == "About Sam":
@@ -52,6 +52,37 @@ if choice == "Uber Project":
52
  st.subheader(f'Map of all pickups at {hour_to_filter}:00')
53
  st.map(filtered_data)
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  if choice == "Contact":
56
  st.title("You can contact me via:")
57
 
 
1
  import streamlit as st
2
+ import time
3
  import pandas as pd
4
  import numpy as np
5
 
6
 
 
7
  with st.sidebar:
8
  st.image("https://www.onepointltd.com/wp-content/uploads/2020/03/inno2.png")
9
  st.title("Samuel's Portfolio")
10
+ choice = st.radio("Navigation", ["About Sam","Uber Project","Attached files", "Contact", "Plotting"])
11
  st.info("This project application helps you understand more about Samuel and his capabilities in detail.")
12
 
13
  if choice == "About Sam":
 
52
  st.subheader(f'Map of all pickups at {hour_to_filter}:00')
53
  st.map(filtered_data)
54
 
55
+ if choice == "Plotting":
56
+ st.set_page_config(page_title="Plotting Demo", page_icon="πŸ“ˆ")
57
+
58
+ st.markdown("# Plotting Demo")
59
+ st.sidebar.header("Plotting Demo")
60
+ st.write(
61
+ """This demo illustrates a combination of plotting and animation with
62
+ Streamlit. We're generating a bunch of random numbers in a loop for around
63
+ 5 seconds. Enjoy!"""
64
+ )
65
+
66
+ progress_bar = st.sidebar.progress(0)
67
+ status_text = st.sidebar.empty()
68
+ last_rows = np.random.randn(1, 1)
69
+ chart = st.line_chart(last_rows)
70
+
71
+ for i in range(1, 101):
72
+ new_rows = last_rows[-1, :] + np.random.randn(5, 1).cumsum(axis=0)
73
+ status_text.text("%i%% Complete" % i)
74
+ chart.add_rows(new_rows)
75
+ progress_bar.progress(i)
76
+ last_rows = new_rows
77
+ time.sleep(0.05)
78
+
79
+ progress_bar.empty()
80
+
81
+ # Streamlit widgets automatically run the script from top to bottom. Since
82
+ # this button is not connected to any other logic, it just causes a plain
83
+ # rerun.
84
+ st.button("Re-run")
85
+
86
  if choice == "Contact":
87
  st.title("You can contact me via:")
88