I had some privacy issues and i had to format my laptop! I have new windows 10 installed and as usual i tried installing the latest python 3.13 version along with pip and VS Code. I installed streamlit, streamlit-navigation-bar and some other libraries so i can continue writing my projects i had started before the computer format.
Long story short i have a local app which was functioning normaly before the format and now its not.
My app code is the following:
import streamlit as st
from streamlit_navigation_bar import st_navbar
import os
import pages as pg
st.set_page_config(layout="wide", initial_sidebar_state="collapsed", page_title='Linked Data App', page_icon='img/ionianlogo.ico')
pages = ["Home", "SecondPage", "GitHub"]
urls = {"GitHub":"https://github.com/kostasafe/Linked-data-app/"}
parent_dir = os.path.dirname(os.path.abspath("__file__"))
options = {
"show_menu": False,
"show_sidebar": False,
}
styles = {
"nav": {
"background-color": "#1b263b",
"padding": "1rem",
"box-shadow": "0px 4px 6px rgba(0, 0, 0, 0.1)",
#"position": "fixed",
"width": "100%",
"z-index": "1000",
#"display": "flex",
"justify-content": "space-around",
"align-items": "center",
},
"div": {
"max-width": "20rem",
"margin": "0 auto",
"padding": "2rem",
},
"span": {
"border-radius": "0.375rem",
"padding": "0.5rem 0.75rem",
"margin": "0 0.25rem",
"background-color": "#e0e0e0",
"color": "#333",
"font-weight": "500",
"flex": "1", # Ensure items take up equal space
"text-align": "center", # Center the text in the nav items
},
"active": {
"color": "#f0a500",
"background-color": "black",
"font-weight": "bold",
"padding": "12px 16px",
"border-bottom": "2px solid #f0a500",
},
"hover": {
"background-color": "rgba(255, 255, 255, 0.25)",
"transition": "background-color 0.3s ease",
},
}
functions = {
"Home": pg.show_Home,
"SecondPage": pg.show_SecondPage
#"GitHub" :pg.show_Git,
}
page = st_navbar(pages, styles=styles, urls=urls, options=options,)
go_to = functions.get(page)
if go_to:
go_to()
my home page is this:
import streamlit as st
import csv
import pandas as pd
def show_Home() :
st.markdown(
"""
<style>
.title {
font-size: 70px;
text-align: center;
margin-bottom: 0px;
margin-top: 0px;
}
</style>
""", unsafe_allow_html=True
)
st.markdown('<div class="title">Welcome to our Linked Data Analysis Application</div>', unsafe_allow_html=True)
st.header("Please upload your desired dataset:", divider="orange")
uploaded_files = st.file_uploader("Choose :green[CSV] or :green[xml] files", type={"csv", "xml"}, accept_multiple_files=True)
#for uploaded_file in uploaded_files:
#bytes_data = uploaded_file.read()
#st.write("filename:", uploaded_file.name)
#st.write(bytes_data)
and the result is like this:
I tried installing different python versions (3.13, 3.12, 3.10) nothing changed, i also have js enabled in my browser as someone suggested to me!
I have spent 3 whole days looking for a solution and i cant find anything!
Have patience is my 1st time writing!