Spaces:
Sleeping
Sleeping
elfsong
commited on
Commit
·
b069048
1
Parent(s):
cb08519
Update
Browse files- app.py +3 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -10,6 +10,7 @@ import requests
|
|
10 |
import streamlit as st
|
11 |
from datetime import datetime
|
12 |
from bs4 import BeautifulSoup
|
|
|
13 |
|
14 |
nextbus_token = os.getenv("NEXTBUS_TOKEN")
|
15 |
datamall_token = os.getenv("DATAMALL_TOKEN")
|
@@ -19,6 +20,8 @@ def wide_space_default():
|
|
19 |
st.set_page_config(layout='wide')
|
20 |
wide_space_default()
|
21 |
|
|
|
|
|
22 |
def get_all_stops():
|
23 |
url = "https://nnextbus.nus.edu.sg/BusStops"
|
24 |
|
|
|
10 |
import streamlit as st
|
11 |
from datetime import datetime
|
12 |
from bs4 import BeautifulSoup
|
13 |
+
from streamlit_autorefresh import st_autorefresh
|
14 |
|
15 |
nextbus_token = os.getenv("NEXTBUS_TOKEN")
|
16 |
datamall_token = os.getenv("DATAMALL_TOKEN")
|
|
|
20 |
st.set_page_config(layout='wide')
|
21 |
wide_space_default()
|
22 |
|
23 |
+
count = st_autorefresh(interval=30000)
|
24 |
+
|
25 |
def get_all_stops():
|
26 |
url = "https://nnextbus.nus.edu.sg/BusStops"
|
27 |
|
requirements.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
beautifulsoup4
|
|
|
|
1 |
+
beautifulsoup4
|
2 |
+
streamlit-autorefresh
|