LaunchScore is a hybrid AI-powered platform that predicts the likelihood of success for a startup idea using both:
- A machine learning model trained on Indian startup funding data.
- A language model (LLM) using LangChain with Gemini Pro and FAISS vector search for contextual analysis.
Users can enter their startup idea, sector, funding stage, location, funding amount, and founded year to get an overall success prediction along with insightful feedback.
- β Neural Network-based ML model trained on real-world startup funding data.
- β LLM-powered qualitative analysis using Gemini Pro and LangChain.
- β FAISS-powered retrieval from a startup dataset for enhanced context.
- β Fully responsive frontend (TailwindCSS).
- β Flask API backend.
- β One-click deployment ready.
LaunchScore/
βββ app.py # Flask server with LLM + ML integration
βββ startup_success_2_0.py # Enhanced ML predictor
βββ models/
β βββ ml_pipeline.pkl # Trained ML pipeline
β βββ ml_model.pkl # ML model weights
β βββ startup_nn.pt # Neural network model
β βββ *_vocab.pkl # Vocabulary encoders
β βββ startup_faiss_index/ # FAISS vector store
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/
β β βββ page.tsx # Main prediction interface
β β βββ layout.tsx # App layout
β β βββ globals.css # Tailwind styles
β βββ package.json # Frontend dependencies
β βββ next.config.ts # Next.js configuration
βββ templates/
β βββ index.html # Backup HTML template
βββ docker-compose.yml # Multi-container setup
βββ Dockerfile # Backend container config
βββ nginx.conf # Reverse proxy config
βββ deploy.sh # Automated deployment script
βββ .env # Environment variables
βββ requirements.txt # Python dependencies
βββ README.md # This file
- Python 3.8+ installed
- Node.js 18+ and npm/bun installed (for frontend)
- Git installed
- Google API Key for Gemini Pro
git clone https://github.com/your-username/launchscore.git
cd launchscoreCreate a .env file in the root directory:
GOOGLE_API_KEY=your-google-api-key-here
FLASK_ENV=development
FLASK_DEBUG=trueGet your Google API Key from Google AI Studio.
# Create and activate virtual environment
python -m venv venv
# On Windows (WSL/PowerShell)
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
# Install backend dependencies
pip install -r requirements.txt
# Run backend development server
python app.pyThe backend API will be available at http://localhost:5000
# Navigate to frontend directory
cd frontend
# Install dependencies (using bun - faster alternative to npm)
bun install
# Start development server
bun devThe frontend will be available at http://localhost:3000
- Backend Health Check:
http://localhost:5000/health - API Endpoint:
http://localhost:5000/predict(POST) - Frontend:
http://localhost:3000
- Docker and Docker Compose installed
- Server with at least 2GB RAM
- Domain/subdomain (optional)
# Make deploy script executable
chmod +x deploy.sh
# Run deployment
./deploy.sh# 1. Create .env file with production settings
cp .env.example .env
nano .env # Add your GOOGLE_API_KEY
# 2. Build and start services
docker-compose up -d --build
# 3. Check service status
docker-compose ps
# 4. View logs
docker-compose logs -fThe API will be available at http://your-server:5000
# Install Vercel CLI
npm i -g vercel
# Navigate to frontend directory
cd frontend
# Deploy to Vercel
vercel
# Set environment variables in Vercel dashboard:
# NEXT_PUBLIC_API_URL=https://your-backend-url.comcd frontend
# Build for production
bun build
# Start production server
bun start# 1. Update system
sudo apt update && sudo apt upgrade -y
# 2. Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
# 3. Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# 4. Clone and deploy
git clone https://github.com/your-username/launchscore.git
cd launchscore
chmod +x deploy.sh
./deploy.shIf deploying on port 80/443:
# Install Nginx
sudo apt install nginx
# Configure reverse proxy
sudo nano /etc/nginx/sites-available/launchscore
# Add configuration:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
# Enable site
sudo ln -s /etc/nginx/sites-available/launchscore /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxGOOGLE_API_KEY=your-google-api-key
FLASK_ENV=production
FLASK_DEBUG=falseNEXT_PUBLIC_API_URL=https://your-backend-domain.com# Check container status
docker-compose ps
# View logs
docker-compose logs -f app
docker-compose logs -f nginx
# Restart services
docker-compose restart
# Update deployment
git pull
docker-compose up -d --buildProblem: ModuleNotFoundError for ML libraries
# Solution: Reinstall requirements in virtual environment
pip install --upgrade -r requirements.txtProblem: FAISS index not found
# Solution: Ensure models directory is complete
ls -la models/
# Re-download missing model files if neededProblem: Google API quota exceeded
# Solution: Check API usage in Google Cloud Console
# Generate new API key if neededProblem: API connection refused
# Solution: Check backend is running and CORS is configured
curl http://localhost:5000/healthProblem: Build failures in Next.js
# Solution: Clear cache and reinstall
rm -rf .next node_modules
bun install
bun devProblem: Port already in use
# Solution: Stop conflicting services
sudo lsof -i :5000
docker-compose downProblem: Out of disk space
# Solution: Clean Docker cache
docker system prune -a- Use production builds for frontend (
bun build) - Enable Docker layer caching
- Configure appropriate worker processes in Gunicorn
- Monitor memory usage for ML models
# Backend logs
docker-compose logs -f app
# Nginx logs
docker-compose logs -f nginx
# System resource usage
docker stats
# Container shell access
docker exec -it launchscore-backend bashOpen your browser and go to:
- Frontend:
http://localhost:3000(Next.js dev server) - Backend API:
http://localhost:5000(Flask dev server) - Health Check:
http://localhost:5000/health
For deployed applications:
- Frontend: Your deployed frontend URL (Vercel/Netlify)
- Backend API: Your deployed backend URL
- Health Check:
https://your-backend-domain.com/health
Fill in the following example data:
- βοΈ Startup Idea β "AI-powered personal finance management app that uses machine learning to provide personalized investment recommendations"
- π·οΈ Sector β FinTech
- π° Funding Stage β Seed
- π Headquarter β Bangalore
- π Founded Year β 2024
- π΅ Funding Amount (in βΉRupees) β 5000000
Click Predict to view:
- The ML & LLM scores
- A combined score out of 10
- Insights and reasoning from the LLM
- ML Score: Computed from structured inputs using a neural network trained on a labeled dataset.
- LLM Score: Generated by LangChain + Gemini Pro using contextual data from similar startups retrieved by FAISS.
- Final Score: Average of the ML and LLM scores (scaled to 10).
- Backend: Flask + LangChain + Gemini Pro (via Google GenerativeAI)
- Frontend: Tailwind CSS, HTML, JavaScript
- ML: Scikit-learn MLPClassifier with pipeline
- Vector Search: FAISS
- Embeddings: HuggingFace
all-MiniLM-L6-v2
- Python 3.8+
- Google API Key (for Gemini)
- Internet connection (for LLM inference)
Pull requests, feedback, and feature suggestions are welcome!
Feel free to fork this repo and build upon it.
This project is for academic and demonstration purposes and is released under the MIT License.
Built by Vishvam Moliya as part of a university project using open-source tools and free-tier APIs.