A web application for classifying lung cancer types using machine learning.
frontend/: Next.js frontend applicationbackend/: FastAPI backend application
The easiest way to run the application is using Docker Compose:
# Build and start the containers
docker-compose up --build
# Run in detached mode (background)
docker-compose up -d --build
# View logs
docker-compose logs -f
# View logs for a specific service
docker-compose logs -f frontend
docker-compose logs -f backend
# Stop the containers
docker-compose down
# Stop the containers and remove volumes
docker-compose down -vThe application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:5001
-
To rebuild a single service:
docker-compose build frontend docker-compose build backend
-
To restart a single service:
docker-compose restart frontend docker-compose restart backend
-
To view container status:
docker-compose ps
-
To check container health:
docker-compose ps
-
Navigate to the backend directory:
cd backend -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python run.py
The backend will be available at http://localhost:5001
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run the development server:
npm run dev
The frontend will be available at http://localhost:3000
The application accepts CSV files for lung cancer classification. The CSV files should have the following format:
- Each row represents a sample
- Columns should contain the features used for classification
- The file should not include headers
After uploading, the file will be sent to the backend for processing, and the results will be displayed once processing is complete.
The frontend communicates with the FastAPI backend through the following endpoints:
/api/upload- POST endpoint for uploading CSV files/api/status/:fileId- GET endpoint for checking the status of a file/api/download/:fileId- GET endpoint for downloading the results
- Next.js (with standalone output optimization)
- React
- FastAPI
- Docker & Docker Compose
- Tailwind CSS
- shadcn/ui components
NEXT_PUBLIC_API_URL: Backend API URL (default: http://localhost:5001/api)
HOST: Host to bind to (default: 0.0.0.0)PORT: Port to run on (default: 5001)