Distopia22 commited on
Commit
d1f5b4b
·
1 Parent(s): 8592951

Added how to install

Browse files
Files changed (1) hide show
  1. how_to_run.txt +117 -0
how_to_run.txt ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <<<<<<< HEAD
2
+ # ICD-CPT Model
3
+
4
+ This project implements a FastAPI application that utilizes the Groq API and a language model (Llama 3.3 70b Versatile) to provide CPT and ICD coding based on provider notes. The application is designed to return structured JSON responses that include the predicted codes along with explanations for each code.
5
+
6
+ ## Project Structure
7
+
8
+ - **src/**: Contains the main application code.
9
+ - **main.py**: Entry point for the FastAPI application.
10
+ - **api/**: Contains API route definitions.
11
+ - **routes.py**: Defines the endpoints for the application.
12
+ - **services/**: Contains service logic for interacting with external APIs.
13
+ - **groq_service.py**: Handles requests to the Groq API and processes responses.
14
+ - **models/**: Contains data models for requests and responses.
15
+ - **request_models.py**: Defines request models for incoming data.
16
+ - **response_models.py**: Defines response models for outgoing data.
17
+ - **config/**: Contains configuration settings for the application.
18
+ - **settings.py**: Configuration for API keys and model IDs.
19
+ - **utils/**: Contains utility functions and prompt templates.
20
+ - **prompts.py**: Defines prompt templates for querying the model.
21
+
22
+ - **tests/**: Contains unit tests for the application.
23
+ - **test_api.py**: Tests for API endpoints.
24
+
25
+ - **requirements.txt**: Lists the dependencies required for the project.
26
+
27
+ - **.env.example**: Template for environment variables.
28
+
29
+ - **.gitignore**: Specifies files to be ignored by Git.
30
+
31
+ - **Dockerfile**: Instructions for building a Docker image for the application.
32
+
33
+ ## Setup Instructions
34
+
35
+ 1. **Clone the Repository**:
36
+ Clone the repository to your local machine.
37
+
38
+ 2. **Create a Virtual Environment**:
39
+ Create a virtual environment to manage dependencies.
40
+ ```
41
+ python -m venv venv
42
+ ```
43
+
44
+ 3. **Activate the Virtual Environment**:
45
+ Activate the virtual environment.
46
+ - On Windows:
47
+ ```
48
+ venv\Scripts\activate
49
+ ```
50
+ - On macOS/Linux:
51
+ ```
52
+ source venv/bin/activate
53
+ ```
54
+
55
+ 4. **Install Dependencies**:
56
+ Install the required dependencies using pip.
57
+ ```
58
+ pip install -r requirements.txt
59
+ ```
60
+
61
+ 5. **Set Up Environment Variables**:
62
+ Copy `.env.example` to `.env` and fill in the necessary values, including the Groq API key and model ID.
63
+
64
+ 6. **Run the Application**:
65
+ Start the FastAPI application.
66
+ ```
67
+ uvicorn src.main:app --reload
68
+ ```
69
+
70
+ ## Usage
71
+
72
+ - **Endpoint**: `/api/coding`
73
+ - **Method**: `POST`
74
+ - **Request Body**:
75
+ ```json
76
+ {
77
+ "provider_notes": "Your provider notes here."
78
+ }
79
+ ```
80
+
81
+ - **Response**:
82
+ ```json
83
+ {
84
+ "icd_codes": [
85
+ {
86
+ "code": "ICD_CODE_1",
87
+ "explanation": "Explanation for ICD_CODE_1"
88
+ }
89
+ ],
90
+ "cpt_codes": [
91
+ {
92
+ "code": "CPT_CODE_1",
93
+ "explanation": "Explanation for CPT_CODE_1"
94
+ }
95
+ ]
96
+ }
97
+ ```
98
+
99
+ ## Deployment
100
+
101
+ For deployment, you can use Docker to containerize the application. Follow the instructions in the Dockerfile to build and run the application in a containerized environment.
102
+
103
+ ## License
104
+
105
+ This project is licensed under the MIT License. See the LICENSE file for more details.
106
+ =======
107
+ ---
108
+ title: Icd Cpt Coding Api
109
+ emoji: 📈
110
+ colorFrom: indigo
111
+ colorTo: indigo
112
+ sdk: docker
113
+ pinned: false
114
+ ---
115
+
116
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
117
+ >>>>>>> cc72a56032827788eed3105a0ef90e037552e5a7