Spaces:
Running
Running
update
Browse files
README.md
CHANGED
@@ -1,102 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
- **Python 3.12** - Programming language
|
11 |
-
- **Docker** - Application containerization
|
12 |
-
- **FAISS** - Library for vector search (used for finding similar medical cases)
|
13 |
-
- **PyJWT/jose** - User authentication and authorization
|
14 |
-
- **Uvicorn** - ASGI server for running FastAPI
|
15 |
-
|
16 |
-
## Local Installation and Setup
|
17 |
-
|
18 |
-
### Prerequisites
|
19 |
-
|
20 |
-
- Python 3.12 or higher
|
21 |
-
- MongoDB
|
22 |
-
- OpenAI API key
|
23 |
-
|
24 |
-
### Windows
|
25 |
-
|
26 |
-
1. Clone the repository:
|
27 |
-
```
|
28 |
-
git clone <repository-url>
|
29 |
-
cd TraumaAI
|
30 |
-
```
|
31 |
-
|
32 |
-
2. Create and activate a virtual environment:
|
33 |
-
```
|
34 |
-
python -m venv .venv
|
35 |
-
.venv\Scripts\activate
|
36 |
-
```
|
37 |
-
|
38 |
-
3. Install dependencies:
|
39 |
-
```
|
40 |
-
pip install -r requirements.txt
|
41 |
-
```
|
42 |
-
|
43 |
-
4. Create a .env file based on .env.example:
|
44 |
-
```
|
45 |
-
copy .env.example .env
|
46 |
-
```
|
47 |
-
Then edit the .env file, adding your values for MongoDB URL and OpenAI API key.
|
48 |
-
|
49 |
-
5. Run the application:
|
50 |
-
```
|
51 |
-
uvicorn main:app --reload
|
52 |
-
```
|
53 |
-
|
54 |
-
### macOS / Ubuntu
|
55 |
-
|
56 |
-
1. Clone the repository:
|
57 |
-
```
|
58 |
-
git clone <repository-url>
|
59 |
-
cd TraumaAI
|
60 |
-
```
|
61 |
-
|
62 |
-
2. Create and activate a virtual environment:
|
63 |
-
```
|
64 |
-
python3 -m venv .venv
|
65 |
-
source .venv/bin/activate
|
66 |
-
```
|
67 |
-
|
68 |
-
3. Install dependencies:
|
69 |
-
```
|
70 |
-
pip install -r requirements.txt
|
71 |
-
```
|
72 |
-
|
73 |
-
4. Create a .env file based on .env.example:
|
74 |
-
```
|
75 |
-
cp .env.example .env
|
76 |
-
```
|
77 |
-
Then edit the .env file, adding your values for MongoDB URL and OpenAI API key.
|
78 |
-
|
79 |
-
5. Run the application:
|
80 |
-
```
|
81 |
-
uvicorn main:app --reload
|
82 |
-
```
|
83 |
-
|
84 |
-
### Running with Docker
|
85 |
-
|
86 |
-
1. Build the Docker image:
|
87 |
-
```
|
88 |
-
docker build -t traumaai .
|
89 |
-
```
|
90 |
-
|
91 |
-
2. Run the container:
|
92 |
-
```
|
93 |
-
docker run -p 7860:7860 --env-file .env traumaai
|
94 |
-
```
|
95 |
-
|
96 |
-
## API Access
|
97 |
-
|
98 |
-
After startup, the API will be available at: http://localhost:7860
|
99 |
-
|
100 |
-
API documentation is available at:
|
101 |
-
- http://localhost:7860/docs - Swagger UI
|
102 |
-
- http://localhost:7860/redoc - ReDoc
|
|
|
1 |
+
---
|
2 |
+
title: TraumaBackend
|
3 |
+
emoji: 🦀
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: pink
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|