Med-X_25.10.8 / quick_start.sh
DeepRat's picture
Upload 43 files
64eded8 verified
#!/bin/bash
# MedeX Quick Start Script
# Quick setup and launch for local testing
echo "πŸ₯ MedeX - Quick Start Script"
echo "=============================="
echo ""
# Check if we're in the right directory
if [ ! -f "streamlit_app.py" ]; then
echo "❌ Error: streamlit_app.py not found"
echo "Please run this script from the MedeX-main directory"
exit 1
fi
# Check Python version
echo "1️⃣ Checking Python version..."
python3 --version || { echo "❌ Python 3 not found"; exit 1; }
echo "βœ… Python found"
echo ""
# Check if virtual environment exists
if [ ! -d "medex_venv" ]; then
echo "2️⃣ Creating virtual environment..."
python3 -m venv medex_venv
echo "βœ… Virtual environment created"
else
echo "2️⃣ Virtual environment already exists"
fi
echo ""
# Activate virtual environment
echo "3️⃣ Activating virtual environment..."
source medex_venv/bin/activate || { echo "❌ Failed to activate venv"; exit 1; }
echo "βœ… Virtual environment activated"
echo ""
# Install/Update dependencies
echo "4️⃣ Installing dependencies..."
pip install --upgrade pip -q
pip install -r requirements.txt -q
echo "βœ… Dependencies installed"
echo ""
# Run pre-deployment tests
echo "5️⃣ Running pre-deployment tests..."
python test_deployment.py
echo ""
# Ask if user wants to continue
read -p "Continue to launch Streamlit? (y/n) " -n 1 -r
echo ""
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Exiting. Run 'streamlit run streamlit_app.py' when ready."
exit 0
fi
# Launch Streamlit
echo "6️⃣ Launching MedeX Streamlit Interface..."
echo ""
echo "🌐 Opening browser at http://localhost:8501"
echo "⌨️ Press Ctrl+C to stop"
echo ""
streamlit run streamlit_app.py
# Cleanup message
echo ""
echo "πŸ‘‹ MedeX stopped. Goodbye!"