Spaces:
Sleeping
Sleeping
update: readme.md for hf space
Browse files
README.md
CHANGED
@@ -1,117 +1,6 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
βββ cli.py
|
8 |
-
βββ main.py
|
9 |
-
βββ README.md
|
10 |
-
βββ llm/
|
11 |
-
β βββ __init__.py
|
12 |
-
β βββ client.py
|
13 |
-
β βββ llm.py
|
14 |
-
βββ .env
|
15 |
-
```
|
16 |
-
|
17 |
-
## Quick Start
|
18 |
-
|
19 |
-
### Prerequisites
|
20 |
-
|
21 |
-
- Python 3.10
|
22 |
-
|
23 |
-
### Installation
|
24 |
-
|
25 |
-
1. Clone the repository:
|
26 |
-
|
27 |
-
```sh
|
28 |
-
git clone https://github.com/yourusername/MALI_Nurse.git
|
29 |
-
cd MALI_Nurse
|
30 |
-
```
|
31 |
-
2. Install the required packages:
|
32 |
-
|
33 |
-
```sh
|
34 |
-
pip install -r requirements.txt
|
35 |
-
```
|
36 |
-
|
37 |
-
Alternatively, you can use Poetry for dependency management:
|
38 |
-
|
39 |
-
```sh
|
40 |
-
poetry install
|
41 |
-
```
|
42 |
-
3. Set up your environment variables in a `.env` file:
|
43 |
-
|
44 |
-
```env
|
45 |
-
TYPHOON_API_KEY=your_typhoon_api_key
|
46 |
-
```
|
47 |
-
|
48 |
-
### Running the CLI
|
49 |
-
|
50 |
-
To start the CLI, run:
|
51 |
-
|
52 |
-
```sh
|
53 |
-
python cli.py
|
54 |
-
```
|
55 |
-
|
56 |
-
### Running the API
|
57 |
-
|
58 |
-
To start the FastAPI server, run:
|
59 |
-
|
60 |
-
```sh
|
61 |
-
uvicorn main:app --reload
|
62 |
-
```
|
63 |
-
|
64 |
-
The server will be available at `http://127.0.0.1:8000`.
|
65 |
-
|
66 |
-
### API Endpoints
|
67 |
-
|
68 |
-
- `GET /history`: Retrieve chat history
|
69 |
-
- `GET /ehr`: Retrieve EHR data
|
70 |
-
- `GET /status`: Get current prompt status
|
71 |
-
- `POST /debug`: Toggle debug mode
|
72 |
-
- `POST /reset`: Reset chat history and EHR data
|
73 |
-
- `POST /nurse_response`: Get a response from the nurse LLM
|
74 |
-
|
75 |
-
### Example Request
|
76 |
-
|
77 |
-
To get a response from the nurse LLM, send a POST request to `/nurse_response` with a JSON body:
|
78 |
-
|
79 |
-
```json
|
80 |
-
{
|
81 |
-
"user_input": "Your question here"
|
82 |
-
}
|
83 |
-
```
|
84 |
-
|
85 |
-
### CLI Commands
|
86 |
-
|
87 |
-
The CLI provides several commands to interact with the Nurse LLM. Below are the available commands:
|
88 |
-
|
89 |
-
- `start`: Start the CLI session.
|
90 |
-
- `help`: Display help information about the CLI commands.
|
91 |
-
- `exit`: Exit the CLI session.
|
92 |
-
|
93 |
-
### Example Usage
|
94 |
-
|
95 |
-
To start the CLI session, simply run:
|
96 |
-
|
97 |
-
```sh
|
98 |
-
python cli.py
|
99 |
-
```
|
100 |
-
|
101 |
-
Once the CLI is running, you can use the following commands:
|
102 |
-
|
103 |
-
- To start interacting with the nurse LLM:
|
104 |
-
|
105 |
-
```sh
|
106 |
-
start
|
107 |
-
```
|
108 |
-
- To display help information:
|
109 |
-
|
110 |
-
```sh
|
111 |
-
help
|
112 |
-
```
|
113 |
-
- To exit the CLI session:
|
114 |
-
|
115 |
-
```sh
|
116 |
-
exit
|
117 |
-
```
|
|
|
1 |
+
title: MALI_Nurse
|
2 |
+
emoji: π³
|
3 |
+
colorFrom: purple
|
4 |
+
colorTo: gray
|
5 |
+
sdk: docker
|
6 |
+
app_port: 7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|