Skip to content

Commit

Permalink
Merge pull request #47 from minggnim/minor-updates
Browse files Browse the repository at this point in the history
Minor updates
  • Loading branch information
minggnim authored Aug 11, 2023
2 parents 026f64f + 523acc6 commit 948b5a1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
16 changes: 16 additions & 0 deletions apps/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Instructions to run applications

1. Install the latest nlp_models package

```
pip install -U nlp_models
```
2. Download Llama2 quantization model `llama-2-7b-chat.ggmlv3.q8_0.bin`
from https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/tree/main and place it under `models` folder
3. Run the application of interest
- Chat `streamlit run chat.py`
- Q&A `streamlit run qa.py`
11 changes: 0 additions & 11 deletions apps/chat.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
"""
To run Llama2 chat UI on CPU
1. Install the latest nlp_models package
`pip install -U nlp_models`
2. Download `llama-2-7b-chat.ggmlv3.q8_0.bin`
from https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/tree/main
and place it under `models` folder
3. Run `streamlit run chat.py` to spin up the UI
"""


import streamlit as st
from langchain.memory import ConversationBufferWindowMemory
from nlp_models.llm.base import LlmConfig
Expand Down
8 changes: 0 additions & 8 deletions apps/qa.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
"""
To run Llama2 QA UI on CPU
1. Install the latest nlp_models package `pip install -U nlp_models`
2. Download `llama-2-7b-chat.ggmlv3.q8_0.bin` from https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/tree/main and place it under `models` folder
3. Run `streamlit run qa.py` to spin up the UI
"""


import streamlit as st
from tempfile import NamedTemporaryFile
from nlp_models.llm.base import LlmConfig
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ fastapi

watchdog
pypdf
pypdfium2
sentence_transformers
faiss-cpu
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = nlp-models
version = 4.2.0
version = 4.2.1
author= Ming Gao
author_email = [email protected]
url = https://github.com/minggnim/nlp-models
Expand Down

0 comments on commit 948b5a1

Please sign in to comment.