CoolFace
Apppublic

Metafazer/finrag-backend

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
clone-setup.sh32 linesDownload Raw Back to scripts
1#!/bin/bash2echo "Setting up FinRAG..."3 4# Setup backend5python3 -m venv .venv6source .venv/bin/activate7pip install -e ".[dev]"8 9# Create .env if it doesn't exist10if [ ! -f .env ]; then11    cp .env.example .env12    echo ""13    echo "Please enter your GOOGLE_API_KEY (or press enter to use the existing one if set):"14    read -r GOOGLE_API_KEY15    if [ ! -z "$GOOGLE_API_KEY" ]; then16        # Use awk or sed to replace the placeholder17        sed -i '' "s/GOOGLE_API_KEY=.*/GOOGLE_API_KEY=\"$GOOGLE_API_KEY\"/" .env 2>/dev/null || sed -i "s/GOOGLE_API_KEY=.*/GOOGLE_API_KEY=\"$GOOGLE_API_KEY\"/" .env18    fi19fi20 21# Setup frontend22cd finrag-ui23npm install24if [ ! -f .env.local ]; then25    cp .env.example .env.local26fi27cd ..28 29echo "Setup complete! Run the project with:"30echo "Terminal 1: cd finrag-ui && npm run dev"31echo "Terminal 2: source .venv/bin/activate && uvicorn finrag.api.app:create_app --factory --reload --port 8002 --env-file .env"32