This repository contains code for training, validating, and deploying the Streamlit web interface for Sobra. Follow the steps below to set up your environment, download the dataset, and run the application.
Make sure you're on a Debian-based Linux system. Download the dataset in the directory containing the code
# Install aria2 for fast, segmented downloading
sudo apt install aria2
# Download dataset using 16 parallel connections
aria2c -x 16 -s 16 -o data.rar "https://data.mendeley.com/public-files/datasets/w2r855hpx8/files/b027579b-9df8-4829-9ef2-27877a0990a7/file_downloaded"
# Extract the dataset
unrar x data.rar
# Ensure unrar is installed. If not, run:
sudo apt install unrar
Create a virtual environment (optional but recommended), then install required packages:
# Create a new conda environment with Python 3.9 (or your desired version)
conda create -n soybean python=3.9 -y
# Activate the environment
conda activate soybean
# Install required packages
pip install -r requirements.txt
To start training the model, run:
python train.py
To evaluate the model performance on the validation set:
python validation.py
To launch the Streamlit web application:
streamlit run app.py
The app will open in your default browser.
Ensure all required files (dataset, model scripts, etc.) are in place before training or testing.
Streamlit requires a compatible browser and a functioning Python environment.
You can deactivate the conda environment anytime with conda deactivate.
6 commits
1 commits
Python
100.0%
This repository contains code for training, validating, and deploying the Streamlit web interface for Sobra. Follow the steps below to set up your environment, download the dataset, and run the application.
Make sure you're on a Debian-based Linux system. Download the dataset in the directory containing the code
# Install aria2 for fast, segmented downloading
sudo apt install aria2
# Download dataset using 16 parallel connections
aria2c -x 16 -s 16 -o data.rar "https://data.mendeley.com/public-files/datasets/w2r855hpx8/files/b027579b-9df8-4829-9ef2-27877a0990a7/file_downloaded"
# Extract the dataset
unrar x data.rar
# Ensure unrar is installed. If not, run:
sudo apt install unrar
Create a virtual environment (optional but recommended), then install required packages:
# Create a new conda environment with Python 3.9 (or your desired version)
conda create -n soybean python=3.9 -y
# Activate the environment
conda activate soybean
# Install required packages
pip install -r requirements.txt
To start training the model, run:
python train.py
To evaluate the model performance on the validation set:
python validation.py
To launch the Streamlit web application:
streamlit run app.py
The app will open in your default browser.
Ensure all required files (dataset, model scripts, etc.) are in place before training or testing.
Streamlit requires a compatible browser and a functioning Python environment.
You can deactivate the conda environment anytime with conda deactivate.
6 commits
1 commits
Python
100.0%