Skip to content

Repository maintenance #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: 'main'
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ __pycache__/

# Virtualenvs
.venv
venv
venv

# Submissions
files_to_update/submissions.pkl

# DS_Store
*.DS_Store
20 changes: 10 additions & 10 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from src.pd_functions import *

# Path to results
RESULTS_PATH = 'data/results.csv'
RESULTS_PATH = 'data/true_y.csv'

def main():
# Get participant name
participant_name = get_participant_name()

# Handle file upload
if participant_name:
uploaded_file = st.file_uploader("Choose a file")
uploaded_file = st.file_uploader("Choose a file", type="csv")
process_file_upload(uploaded_file, participant_name)

# Show leaderboard
Expand All @@ -22,7 +22,7 @@ def main():

def get_participant_name():
text_input_container = st.empty()
text_input_container.text_input("Introduce participant name: ", key="text_input")
text_input_container.text_input("Enter your participant name: ", key="text_input")

if st.session_state.text_input != "":
text_input_container.empty()
Expand All @@ -35,13 +35,13 @@ def process_file_upload(uploaded_file, participant_name):
if uploaded_file is not None:
try:
test = get_ready_test(RESULTS_PATH, uploaded_file)
participant_results = get_metrics(RESULTS_PATH, test)

st.success('Dataframe uploaded successfully!')

display_participant_results(participant_results)

update_submissions(participant_results)

if isinstance(test, pd.DataFrame):
participant_results = get_metrics(RESULTS_PATH, test)
st.success('Dataframe uploaded successfully!')
display_participant_results(participant_results)
update_submissions(participant_results)
plot_submissions()

except Exception as e:
st.error(f"The file has a wrong format, please, review it and load it again. {str(e)}")
Expand Down
File renamed without changes.
Loading