Spaces:
Running
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 | |
1. Clone the repository: | |
``` | |
git clone <repository-url> | |
cd TraumaAI | |
``` | |
2. Create and activate a virtual environment: | |
``` | |
python -m venv .venv | |
.venv\Scripts\activate | |
``` | |
3. Install dependencies: | |
``` | |
pip install -r requirements.txt | |
``` | |
4. 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. | |
5. Run the application: | |
``` | |
uvicorn main:app --reload | |
``` | |
### macOS / Ubuntu | |
1. Clone the repository: | |
``` | |
git clone <repository-url> | |
cd TraumaAI | |
``` | |
2. Create and activate a virtual environment: | |
``` | |
python3 -m venv .venv | |
source .venv/bin/activate | |
``` | |
3. Install dependencies: | |
``` | |
pip install -r requirements.txt | |
``` | |
4. 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. | |
5. Run the application: | |
``` | |
uvicorn main:app --reload | |
``` | |
### Running with Docker | |
1. Build the Docker image: | |
``` | |
docker build -t traumaai . | |
``` | |
2. 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 | |