Spaces:
Sleeping
Sleeping
Vitomir Jovanović
commited on
Commit
·
348df3a
1
Parent(s):
9f74c6b
Update Readme.md
Browse files- README.md +13 -5
- main.py → fast_api.py +0 -0
README.md
CHANGED
|
@@ -14,20 +14,28 @@ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-
|
|
| 14 |
|
| 15 |
### For local deployment run
|
| 16 |
```
|
| 17 |
-
|
| 18 |
```
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
```
|
| 22 |
data_reader.py
|
| 23 |
```
|
| 24 |
-
creates data of various prompts for encoding into vector database
|
| 25 |
-
|
| 26 |
Faiss index that is used is small and not optimized, used for experimental datasets. Search is brute force, not optimised.
|
| 27 |
|
| 28 |
### Streamlit
|
| 29 |
```
|
| 30 |
streamlit run app.py
|
| 31 |
```
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
|
|
|
| 14 |
|
| 15 |
### For local deployment run
|
| 16 |
```
|
| 17 |
+
fast_api.py
|
| 18 |
```
|
| 19 |
+
Script creates swagger app with endpoints on [localhost:8084](http://127.0.0.1:8084/docs). First endpoint return the top k semanticaly most similar prompts with query prompt. Second endpoint returns all similarites with query (only applicable for very small datasets).
|
| 20 |
+
|
| 21 |
+
### Data Ingestion
|
| 22 |
|
| 23 |
```
|
| 24 |
data_reader.py
|
| 25 |
```
|
| 26 |
+
creates data of various prompts for encoding into vector database, from prompt-picture dataset.
|
| 27 |
+
Local database encoded only 6000 prompts.
|
| 28 |
Faiss index that is used is small and not optimized, used for experimental datasets. Search is brute force, not optimised.
|
| 29 |
|
| 30 |
### Streamlit
|
| 31 |
```
|
| 32 |
streamlit run app.py
|
| 33 |
```
|
| 34 |
+
Should be run for streamlit app, it can be assessed locally on http://localhost:8501.
|
| 35 |
+
|
| 36 |
+
### Docker
|
| 37 |
+
```
|
| 38 |
+
docker build -t my-streamlit-app .
|
| 39 |
+
```
|
| 40 |
+
from main dir
|
| 41 |
|
main.py → fast_api.py
RENAMED
|
File without changes
|