Spaces:
Runtime error
Runtime error
🫶 Update readme with gradio
Browse files
README.md
CHANGED
@@ -27,8 +27,8 @@ bot.save_index("index.pickle")
|
|
27 |
bot = QnABot(directory="./mydata", index="index.pickle")
|
28 |
```
|
29 |
|
30 |
-
You can also create a FastAPI app that will expose the bot as an API.
|
31 |
-
|
32 |
You should then be able to visit `http://localhost:8000/docs` to see the API documentation.
|
33 |
|
34 |
```python
|
@@ -37,6 +37,16 @@ from qnabot import QnABot, create_app
|
|
37 |
app = create_app(QnABot("./mydata"))
|
38 |
```
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
### Features
|
41 |
|
42 |
- [x] Create a question answering bot over your documents with one line of code using GPT
|
@@ -44,12 +54,12 @@ app = create_app(QnABot("./mydata"))
|
|
44 |
- [x] Local data source (directory of documents) or S3 data source
|
45 |
- [x] FAISS for storing vectors / index
|
46 |
- [x] Expose bot over API using FastAPI
|
|
|
47 |
- [ ] Integration with [guardrails](https://github.com/ShreyaR/guardrails)
|
48 |
- [ ] Integration with [GPTCache](https://github.com/zilliztech/GPTCache)
|
49 |
- [ ] Support for other vector databases (e.g. Weaviate, Pinecone)
|
50 |
- [ ] Customise prompt
|
51 |
- [ ] Support for LLaMA model
|
52 |
-
- [ ] CLI / UI
|
53 |
|
54 |
### Here's how it works
|
55 |
|
|
|
27 |
bot = QnABot(directory="./mydata", index="index.pickle")
|
28 |
```
|
29 |
|
30 |
+
You can also create a FastAPI app that will expose the bot as an API using the create_app function.
|
31 |
+
Assuming you file is called `main.py` run `uvicorn main:app --reload` to run the API locally.
|
32 |
You should then be able to visit `http://localhost:8000/docs` to see the API documentation.
|
33 |
|
34 |
```python
|
|
|
37 |
app = create_app(QnABot("./mydata"))
|
38 |
```
|
39 |
|
40 |
+
You can expose a gradio UI for the bot using `create_interface` function.
|
41 |
+
Assuming your file is called `ui.py` run `gradio qnabot/ui.py` to run the UI locally.
|
42 |
+
You should then be able to visit `http://127.0.0.1:7860` to see the API documentation.
|
43 |
+
|
44 |
+
```python
|
45 |
+
from qnabot import QnABot, create_interface
|
46 |
+
|
47 |
+
demo = create_interface(QnABot("./mydata"))
|
48 |
+
```
|
49 |
+
|
50 |
### Features
|
51 |
|
52 |
- [x] Create a question answering bot over your documents with one line of code using GPT
|
|
|
54 |
- [x] Local data source (directory of documents) or S3 data source
|
55 |
- [x] FAISS for storing vectors / index
|
56 |
- [x] Expose bot over API using FastAPI
|
57 |
+
- [x] Gradio UI
|
58 |
- [ ] Integration with [guardrails](https://github.com/ShreyaR/guardrails)
|
59 |
- [ ] Integration with [GPTCache](https://github.com/zilliztech/GPTCache)
|
60 |
- [ ] Support for other vector databases (e.g. Weaviate, Pinecone)
|
61 |
- [ ] Customise prompt
|
62 |
- [ ] Support for LLaMA model
|
|
|
63 |
|
64 |
### Here's how it works
|
65 |
|