Spaces:
Build error
Build error
File size: 1,934 Bytes
75bfa09 08606a2 8cdd0c9 75bfa09 a5cbc9a 08606a2 a5cbc9a ff2d6c7 75bfa09 08606a2 ff2d6c7 08606a2 75bfa09 60a59c6 75bfa09 60a59c6 75bfa09 08606a2 60a59c6 75bfa09 08606a2 60a59c6 ef96aaf 78196fe ef96aaf 8cdd0c9 ef96aaf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# chatbot-streamlit-demo
This application demonstrates how to setup a simple ChatBot with [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service), [llama-index](https://docs.llamaindex.ai/en/stable/), and [Streamlit](https://streamlit.io).
The ChatBot enables you to talk with your own data - in this case, to learn about [André's research](https://scholar.google.com/citations?user=U20zUHQAAAAJ).
## Getting Started
These instructions were tested on a MacBook Pro with M2 chip running macOS 13.6 Ventura with `Python 3.9.6`.
1. Setup virtual environment and install dependencies:
```
python3 -m venv venv/
source venv/bin/activate
pip install -r requirements.txt
```
2. Set OPENAI_API_KEY:
```
export OPENAI_API_KEY=<insert key here>
```
3. Create the `config.json` file and fill in the relevant info:
```
{
"CHATGPT_MODEL":"<insert model name>",
"OPENAI_API_BASE":"https://<insert-openai-service-name>.openai.azure.com",
"OPENAI_API_VERSION":"<insert version>",
"ENGINE": "<insert deployment model name>",
"ENGINE_EMBEDDING": "<insert deployment embedding name>"
}
```
4. Launch the app:
```
streamlit run app.py
```
A Streamlit browser window should automatically open. If not, the app can be accessed at `http://localhost:8501`
## Demonstration
Below is a snapshot on how the UI should look. A live demo may be made openly available in the future.
<img width="800" alt="Screenshot 2023-10-18 at 13 06 51" src="https://github.com/andreped/chatbot-streamlit-demo/assets/29090665/0e367153-9f0e-48d6-8059-dd060f917a97">
## Disclaimer
Only public PDFs were used for this demonstration. Some of André's research is sadly behind a paywall and thus we have chosen not to include the PDFs in this demo to avoid copyright issues.
## License
The code in this repository is released under [MIT license](https://github.com/andreped/chatbot-streamlit-demo/blob/main/LICENSE).
|