cryptic / run.sh
vlbandara's picture
Upload folder using huggingface_hub
eb27803 verified
raw
history blame contribute delete
983 Bytes
#!/bin/bash
# Activate virtual environment
if [ -d "venv" ]; then
source venv/bin/activate
echo "Virtual environment activated"
else
echo "Virtual environment not found. Creating one..."
python -m venv venv
source venv/bin/activate
pip install poetry
poetry install
echo "Virtual environment created and activated"
fi
# Check if .env file exists
if [ ! -f ".env" ]; then
echo "Error: .env file not found."
echo "Please create a .env file with your API keys based on .env.example"
exit 1
fi
# Parse command line arguments
if [ "$1" == "monitor" ]; then
echo "Starting Bitcoin analysis in monitoring mode..."
python -m src.crypto_analysis.main monitor
elif [ "$1" == "train" ]; then
ITERATIONS=${2:-1}
echo "Training Bitcoin analysis crew for $ITERATIONS iterations..."
python -m src.crypto_analysis.main train $ITERATIONS
else
echo "Running one-time Bitcoin analysis..."
python -m src.crypto_analysis.main
fi