Spaces:
Sleeping
Sleeping
Commit
·
efd54b4
1
Parent(s):
df5cefa
new index
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import sys
|
|
| 4 |
import logging
|
| 5 |
from config import *
|
| 6 |
from documents_prep import DocumentsPreparation
|
| 7 |
-
from index_retriever import
|
| 8 |
from chat_handler import ChatHandler
|
| 9 |
|
| 10 |
REPO_ID = "MrSimple01/AIEXP_RAG_FILES"
|
|
@@ -23,13 +23,12 @@ def log_message(message):
|
|
| 23 |
sys.stdout.flush()
|
| 24 |
|
| 25 |
def initialize_system():
|
| 26 |
-
global doc_prep,
|
| 27 |
|
| 28 |
try:
|
| 29 |
log_message("Запуск инициализации системы AIEXP")
|
| 30 |
|
| 31 |
doc_prep = DocumentsPreparation(REPO_ID, HF_TOKEN)
|
| 32 |
-
index_retriever = IndexRetriever(config=sys.modules[__name__])
|
| 33 |
|
| 34 |
log_message("Подготовка документов")
|
| 35 |
all_documents = doc_prep.prepare_all_documents()
|
|
|
|
| 4 |
import logging
|
| 5 |
from config import *
|
| 6 |
from documents_prep import DocumentsPreparation
|
| 7 |
+
from index_retriever import initialize_models
|
| 8 |
from chat_handler import ChatHandler
|
| 9 |
|
| 10 |
REPO_ID = "MrSimple01/AIEXP_RAG_FILES"
|
|
|
|
| 23 |
sys.stdout.flush()
|
| 24 |
|
| 25 |
def initialize_system():
|
| 26 |
+
global doc_prep, chat_handler
|
| 27 |
|
| 28 |
try:
|
| 29 |
log_message("Запуск инициализации системы AIEXP")
|
| 30 |
|
| 31 |
doc_prep = DocumentsPreparation(REPO_ID, HF_TOKEN)
|
|
|
|
| 32 |
|
| 33 |
log_message("Подготовка документов")
|
| 34 |
all_documents = doc_prep.prepare_all_documents()
|