Spaces:
Paused
Paused
Daniel Marques
commited on
Commit
·
4965a65
1
Parent(s):
d0445bc
fix: memory error
Browse files- main.py +5 -2
- requirements.txt +1 -0
main.py
CHANGED
@@ -4,6 +4,10 @@ import shutil
|
|
4 |
import subprocess
|
5 |
import torch
|
6 |
import json
|
|
|
|
|
|
|
|
|
7 |
|
8 |
from fastapi import FastAPI, HTTPException, UploadFile, WebSocket, WebSocketDisconnect
|
9 |
from fastapi.staticfiles import StaticFiles
|
@@ -123,8 +127,7 @@ def run_ingest_route():
|
|
123 |
retriever=RETRIEVER,
|
124 |
return_source_documents=SHOW_SOURCES,
|
125 |
chain_type_kwargs={
|
126 |
-
"prompt": prompt
|
127 |
-
"memory": memory
|
128 |
},
|
129 |
)
|
130 |
|
|
|
4 |
import subprocess
|
5 |
import torch
|
6 |
import json
|
7 |
+
import faulthandler
|
8 |
+
|
9 |
+
faulthandler.enable()
|
10 |
+
|
11 |
|
12 |
from fastapi import FastAPI, HTTPException, UploadFile, WebSocket, WebSocketDisconnect
|
13 |
from fastapi.staticfiles import StaticFiles
|
|
|
127 |
retriever=RETRIEVER,
|
128 |
return_source_documents=SHOW_SOURCES,
|
129 |
chain_type_kwargs={
|
130 |
+
"prompt": prompt
|
|
|
131 |
},
|
132 |
)
|
133 |
|
requirements.txt
CHANGED
@@ -31,6 +31,7 @@ websockets
|
|
31 |
pydantic
|
32 |
redis
|
33 |
aioredis
|
|
|
34 |
|
35 |
# Streamlit related
|
36 |
streamlit
|
|
|
31 |
pydantic
|
32 |
redis
|
33 |
aioredis
|
34 |
+
faulthandler
|
35 |
|
36 |
# Streamlit related
|
37 |
streamlit
|