Spaces:
Sleeping
Sleeping
File size: 1,058 Bytes
50de76f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
import streamlit as st
from utils.data_utils import load_dataset
from utils.model_utils import load_model, train_model
from utils.ui_utils import display_model_selection, display_training_method_selection, display_dataset_upload, display_model_details, display_training_progress
# Set the page title
st.title("FallnAI Trainer")
# Display the model selection dropdown
model = display_model_selection()
# Display the training method selection dropdown
training_method = display_training_method_selection()
# Display the dataset upload
uploaded_file = display_dataset_upload()
# Display the model details
display_model_details(model)
# Add a button to start training
if st.button("Train Model"):
# Load the model
model = load_model(model)
# Load the dataset
data = load_dataset(uploaded_file)
# Train the model
trained_model = train_model(model, data, training_method)
# Display the trained model
st.write("Trained Model:", trained_model)
# Display the training progress
display_training_progress(trained_model) |