21 lines
585 B
Python
21 lines
585 B
Python
# import mariadb
|
|
from dotenv import load_dotenv
|
|
import os
|
|
import sys
|
|
from app.common.elastic_helper import ElasticHelper
|
|
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
|
|
load_dotenv(dotenv_path=r"D:\init_mahdi\dataParsers\config.env")
|
|
|
|
host = os.getenv("HOST_160")
|
|
password = os.getenv("HOST_160_PASS")
|
|
elastic = ElasticHelper(es_url=host, es_pass=password, es_user="elastic")
|
|
|
|
|
|
elastic.exportToJsonForAI(
|
|
path_back=r"D:\init_mahdi\dataParsers",
|
|
index_name="mj_qa_section", out_name="mj_qa_section.json"
|
|
)
|
|
|
|
# python -m app.save_qa_rules_from160 |