Spaces:
Sleeping
Sleeping
import os | |
import sys | |
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..", "frontend")) | |
sys.path.append(src_directory) | |
import streamlit as st | |
import streamlit_functions | |
st.title("World Population Data") | |
csv_file = "./world_population.csv" | |
# csv_file = st.file_uploader("Choose a CSV file", type=['csv']) | |
if csv_file: | |
choosen_data = streamlit_functions.choose_data_view(st) | |
if choosen_data == "Show All Continents": | |
option = choosen_data.replace(" ","") | |
streamlit_functions.display_contents(option, st) | |
if choosen_data == "Show All Countries": | |
option = choosen_data.replace(" ","") | |
streamlit_functions.display_contents(option, st) | |
if choosen_data == "Show Continent Stats": | |
streamlit_functions.display_stats(st,choosen_data) | |
if choosen_data == "Show Country Stats": | |
streamlit_functions.display_stats(st,choosen_data) | |