Spaces:
Runtime error
Runtime error
incrementa base de verdades
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import time
|
|
7 |
import logging
|
8 |
import shutil
|
9 |
from json import JSONDecodeError
|
|
|
10 |
|
11 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, AutoConfig
|
12 |
from haystack import Document
|
@@ -156,6 +157,10 @@ def start_haystack():
|
|
156 |
"""
|
157 |
load document store, retriever, entailment checker and create pipeline
|
158 |
"""
|
|
|
|
|
|
|
|
|
159 |
shutil.copy("./data/faiss_document_store.db", ".")
|
160 |
document_store = FAISSDocumentStore(
|
161 |
faiss_index_path=f"./data/my_faiss_index.faiss",
|
|
|
7 |
import logging
|
8 |
import shutil
|
9 |
from json import JSONDecodeError
|
10 |
+
import os
|
11 |
|
12 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, AutoConfig
|
13 |
from haystack import Document
|
|
|
157 |
"""
|
158 |
load document store, retriever, entailment checker and create pipeline
|
159 |
"""
|
160 |
+
try:
|
161 |
+
os.remove('./data/faiss_document_store.db')
|
162 |
+
except:
|
163 |
+
pass
|
164 |
shutil.copy("./data/faiss_document_store.db", ".")
|
165 |
document_store = FAISSDocumentStore(
|
166 |
faiss_index_path=f"./data/my_faiss_index.faiss",
|