Spaces:
Running
Running
marcellopoliti
commited on
Commit
•
2c295e5
1
Parent(s):
907323e
test: clean error 2
Browse files- requirements.txt +4 -4
- retrieve_kb.py +2 -1
requirements.txt
CHANGED
@@ -9,10 +9,10 @@ pypdf==3.16.4
|
|
9 |
python-multipart==0.0.6
|
10 |
matplotlib==3.8.3
|
11 |
umap-learn==0.5.5
|
12 |
-
ipython
|
13 |
-
librosa
|
14 |
-
future
|
15 |
-
yt-dlp
|
16 |
pysqlite3>=0.5.2
|
17 |
pyspellchecker>=0.8.1
|
18 |
beautifulsoup4>=4.12.2
|
|
|
9 |
python-multipart==0.0.6
|
10 |
matplotlib==3.8.3
|
11 |
umap-learn==0.5.5
|
12 |
+
ipython==8.24.0
|
13 |
+
librosa==0.10.2.post1
|
14 |
+
future==1.0.0
|
15 |
+
yt-dlp==2024.4.9
|
16 |
pysqlite3>=0.5.2
|
17 |
pyspellchecker>=0.8.1
|
18 |
beautifulsoup4>=4.12.2
|
retrieve_kb.py
CHANGED
@@ -2,6 +2,7 @@ from fastapi import APIRouter
|
|
2 |
from utils import get_chroma_client, get_embedding_function
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
|
|
5 |
|
6 |
load_dotenv()
|
7 |
openai_key = os.getenv("OPENAI_API_KEY")
|
@@ -14,7 +15,7 @@ def get_current_knowledge_bases(client):
|
|
14 |
knowledge_boxes = client.list_collections()
|
15 |
return knowledge_boxes
|
16 |
except Exception as e:
|
17 |
-
|
18 |
|
19 |
|
20 |
def get_knowledge_base_information(
|
|
|
2 |
from utils import get_chroma_client, get_embedding_function
|
3 |
import os
|
4 |
from dotenv import load_dotenv
|
5 |
+
import streamlit as st
|
6 |
|
7 |
load_dotenv()
|
8 |
openai_key = os.getenv("OPENAI_API_KEY")
|
|
|
15 |
knowledge_boxes = client.list_collections()
|
16 |
return knowledge_boxes
|
17 |
except Exception as e:
|
18 |
+
st.error(f"{str(e)}")
|
19 |
|
20 |
|
21 |
def get_knowledge_base_information(
|