- Project Overview
-
Getting Started
- Clone the Repository
- Setup
- Directory Structure
- Use Case Diagram
- Data Sources
- Authors and Acknowledgment
- Assist first responders and medical personnel
- Enable rapid and efficient emergency response and medical care
- Patient classification system to determine treatment priority in emergencies.
- In Korea, the format of triage used in emergency rescue activities is specified in the rules on emergency rescue response activities and field command.
git clone https://github.com/seongyeon1/Fraiday.git
cd Fraiday
To start the application for the first time:
make startapp
setup.sh
will prompt you to enter your UPSTAGE_API_KEY during execution.
To rerun the application:
make rerun
chmod +x setup.sh
./setup.sh
-
setup.sh
will prompt you to enter your UPSTAGE_API_KEY during execution.You can check the results at http://0.0.0.0:8000/
- http://0.0.0.0:8000/chat/playground
- A model that converses like a real emergency responder and excels in multi-turn conversations.
- http://0.0.0.0:8000/main/playground
- A model that is proficient in explaining first aid using RAG, informs about KTAS levels, and summarizes conversations.
python app/main.py
Create a Virtual Environment
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
cat > .env
UPSTAGE_API_KEY='Your API key' # e.g., UPSTAGE_API_KEY=up_YW~
- After entering, close the
cat
command using Ctrl+C.
cd app
python main.py
L3K1._demo.MP4
Fraiday
├── app
│ ├── main.py
│ ├── chat.py
│ ├── rag.py
│ └── template
│ └── (prompt templates)
├── preprocessing
│ ├── ocr.py
│ └── chunking.py
├── setup.sh
├── requirements.txt
└── .env(example)
app/main.py
: The main page utilizing FastAPI and Langserve.app/chat.py
:- Uses the Upstage API(for model, embeddings) to fine-tune prompts for an emergency response chatbot demo (under development).
- Excels in multi-turn conversations.
- Chats like a real emergency responder but lacks precise knowledge for professional expertise.
app/rag.py
: Uses RAG (Seoul National University First Aid).- A more specialized model compared to the
chat
page. - Proficient in explaining first aid using Upstage API(for model, embeddings) and RAG.
- Informs about KTAS levels and summarizes conversations.
- Lacks flexibility in conversations as it follows procedures to inform about KTAS levels.
- A more specialized model compared to the
app/templates
: Stores prompt templates.
- Functions for embedding and OCR processing for RAG.
- Currently used for OCR processing and embedding Seoul National University data and the First Aid Guidebook.
preprocessing/ocr.py
preprocessing/chunking.py
It will be implemented in the form of a router model that combines all of the following features
- Multi-turn dialogue: It is possible to respond and respond quickly according to the context by being proficient in multi-turn dialogue (currently, it is possible to implement through
chat.py
model) - Provide first aid information: Provide accurate information based on clear knowledge (Currently, the
rag.py
model has been verified for implementation) - Conversation summary: Summarise the information received at the end of an emergency conversation and use it as an aid for emergency room visits (implemented by tuning the prompt to summarise specific conditions based on history)
First aid resources (for RAG)
Real emergency voice call dataset
If you have any questions or comments about our project, please contact below.
EunkyungLee | SungyeonKim | JunghoonLee | JunghuiLee |
---|---|---|---|
@ek0111 |
@seongyeon1 |
@coronarita1991 |
@wjdgml0526 |
eunkyung0111@gmail.com | ksy974498@gmail.com | coronarita1991@gmail.com | wjdgml0526@gmail.com |