Bugfix: created chroma_db

This commit is contained in:
Mario Gil 2024-10-09 13:26:39 -05:00
parent 4ab1096c89
commit a1858f5106
4 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ docker build -t supertutor-app .
para ejecutar:
docker run -it -p 7884:7884 --rm fastapi-app
docker run -it -p 7884:7884 --rm supertutor-app

View File

@ -7,6 +7,7 @@ WORKDIR /app
COPY requirements.txt ./
# Instalar las dependencias de Python
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir -r requirements.txt
# Copiar todo el código de la aplicación al contenedor

View File

@ -145,6 +145,8 @@ def listmodelactives():
except:
print("cambio")
return Div(id="options",hx_target="this",hx_swap="outerHTML",hx_get="/listmodelactives",hx_trigger="click from:#buttonMenuuser")
if not os.path.exists("static/"+userdata+"/chroma_db"):
os.makedirs("static/"+userdata+"/chroma_db")
db = chromadb.PersistentClient(path="static/"+userdata+"/chroma_db")
files= db.list_collections()

View File

@ -106,7 +106,6 @@ pypdf==4.3.1
PyPika==0.48.9
pyproject_hooks==1.2.0
pysqlite3-binary==0.5.3.post1
pysqlite3-binary==0.5.3.post1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-fasthtml==0.6.7