Spaces:
Running
TraumaAI
An artificial intelligence-based system for assistance in diagnosis and processing of trauma data. TraumaAI provides an API for interaction with a chat system, storage and analysis of medical data related to traumatology.
Core Technologies
- FastAPI - Modern high-performance web framework for building APIs
- MongoDB - NoSQL database for data storage
- OpenAI - Integration with artificial intelligence models for medical data analysis
- Python 3.12 - Programming language
- Docker - Application containerization
- FAISS - Library for vector search (used for finding similar medical cases)
- PyJWT/jose - User authentication and authorization
- Uvicorn - ASGI server for running FastAPI
Local Installation and Setup
Prerequisites
- Python 3.12 or higher
- MongoDB
- OpenAI API key
Windows
Clone the repository:
git clone <repository-url> cd TraumaAI
Create and activate a virtual environment:
python -m venv .venv .venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Create a .env file based on .env.example:
copy .env.example .env
Then edit the .env file, adding your values for MongoDB URL and OpenAI API key.
Run the application:
uvicorn main:app --reload
macOS / Ubuntu
Clone the repository:
git clone <repository-url> cd TraumaAI
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Create a .env file based on .env.example:
cp .env.example .env
Then edit the .env file, adding your values for MongoDB URL and OpenAI API key.
Run the application:
uvicorn main:app --reload
Running with Docker
Build the Docker image:
docker build -t traumaai .
Run the container:
docker run -p 7860:7860 --env-file .env traumaai
API Access
After startup, the API will be available at: http://localhost:7860
API documentation is available at:
- http://localhost:7860/docs - Swagger UI
- http://localhost:7860/redoc - ReDoc