Spaces:
Runtime error
Runtime error
File size: 3,778 Bytes
93ef51a 18383f3 93ef51a caa04b3 93ef51a caa04b3 1980b84 caa04b3 3dc7ebb caa04b3 53450c2 089ac6b 93ef51a 089ac6b 93ef51a 089ac6b 53450c2 089ac6b 18383f3 089ac6b 1980b84 93ef51a 089ac6b 93ef51a 089ac6b |
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
---
title: "ReferenceBot: KnowledgeGPT + Azure OpenAI = <3"
colorFrom: indigo
colorTo: indigo
sdk: docker
app_port: 8501
emoji: 💬
pinned: false
license: mit
app_file: knowledge_gpt/main.py
---
# [ReferenceBot](https://github.com/andreped/referencebot#referencebot)
[](https://opensource.org/licenses/MIT)
<a target="_blank" href="https://huggingface.co/spaces/andreped/ReferenceBot"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
[](https://referencebot.streamlit.app)
[](https://github.com/andreped/ReferenceBot/actions/workflows/deploy.yml)
## [Continuous integration](https://github.com/andreped/referencebot#continuous-integration)
| Build Type | Status |
| - | - |
| **HF Deploy** | [](https://github.com/andreped/referencebot/actions) |
| **File size check** | [](https://github.com/andreped/referencebot/actions) |
| **Formatting check** | [](https://github.com/andreped/ReferenceBot/actions) |
## [Installation](https://github.com/andreped/referencebot#installation)
Follow the instructions below to run the Streamlit server locally.
### [Prerequisites](https://github.com/andreped/referencebot#prerequisites)
Make sure you have Python `≥3.10` installed.
### [Steps](https://github.com/andreped/referencebot#steps)
These instructions were tested on macOS 13.6 Ventura with ARM CPU and Python `3.10.11`.
1. Clone the repository:
```bash
git clone https://github.com/andreped/ReferenceBot
cd ReferenceBot
```
2. Setup virtual environment and install dependencies:
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
3. Create the secrets file at `.streamlit/secrets.toml` and fill in the relevant info:
```bash
OPENAI_API_KEY = "<insert OpenAI API key>"
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. Run the Streamlit server
```bash
streamlit run knowledge_gpt/main.py
```
## [Build with Docker](https://github.com/andreped/referencebot#build-with-docker)
Run the following commands to build and run the Docker image.
```bash
docker build -t reference-bot .
docker run -p 8501:8501 reference-bot
```
Open http://localhost:8501 in your browser to access the app.
## [Demo](https://github.com/andreped/referencebot#demo) <a target="_blank" href="https://huggingface.co/spaces/andreped/ReferenceBot"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
A live demonstration is hosted at Hugging Face! Click the 🤗 badge above.

## [Acknowledgements](https://github.com/andreped/referencebot#acknowledgements)
We have built on-top of [KnowledgeGPT](https://github.com/mmz-001/knowledge_gpt) to enable the tool be be used with Azure OpenAI Services. Thus, all credit should go towards the original developers.
## [License](https://github.com/andreped/referencebot#license)
Distributed under the MIT License. See [LICENSE](https://github.com/andreped/ReferenceBot/blob/main/LICENSE) for more information.
|