gn_dataset
This commit is contained in:
+18
-7
@@ -5,16 +5,17 @@ from text_normalizer import TextNormalizer
|
||||
from general_functions import *
|
||||
from elastic_helper import ElasticHelper
|
||||
from create_relation_tags import *
|
||||
from temp_refactor_gn_dataset import *
|
||||
|
||||
|
||||
load_dotenv(dotenv_path='config.env')
|
||||
|
||||
|
||||
host=os.getenv('HOST_160')
|
||||
password=os.getenv('HOST_160_PASS')
|
||||
# host=os.getenv('HOST_160')
|
||||
# password=os.getenv('HOST_160_PASS')
|
||||
|
||||
# host=os.getenv('HOST_112')
|
||||
# password=os.getenv('HOST_112_PASS')
|
||||
host=os.getenv('HOST_112')
|
||||
password=os.getenv('HOST_112_PASS')
|
||||
|
||||
# host=os.getenv('HOST_60')
|
||||
# password=os.getenv('HOST_60_PASS')
|
||||
@@ -31,6 +32,17 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
#-------------------------------------------------------
|
||||
##
|
||||
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "gn_dataset")
|
||||
|
||||
moveDataset1(elastic, "G:/Project2/111/gn_dataset_14031125.zip", "gn_dataset")
|
||||
|
||||
|
||||
## کد نمونه بازیابی از فایل
|
||||
#path_back = 'G:/Project2/111'
|
||||
#elastic.restorFileToElastic(path_back, 'gn_dataset_14031125.zip', 'majles', True, 'mj_qa_section')
|
||||
|
||||
|
||||
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section")
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section_ai")
|
||||
#elastic.restorFileToElastic("G:/Project2/111", "mj_qa_section_ai", 'majles', True, "mj_qa_section")
|
||||
@@ -47,8 +59,8 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
#-------------------------------------------------------
|
||||
##
|
||||
|
||||
ai_url_chunk = os.getenv("ai_url_chunk")
|
||||
fill_chunk_tags(elastic, ai_url_chunk, "mj_qa_section")
|
||||
#ai_url_chunk = os.getenv("ai_url_chunk")
|
||||
#fill_chunk_tags(elastic, ai_url_chunk, "mj_qa_section")
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
@@ -63,7 +75,6 @@ fill_chunk_tags(elastic, ai_url_chunk, "mj_qa_section")
|
||||
# print(response.text)
|
||||
# print(response)
|
||||
|
||||
|
||||
# payload={
|
||||
# "text":"طرفین به منظور اتمام مطالعات و احداث نیروگاههای جریانی ارس و تأسیسات مربوطه، منطقه مشترک ساختمانی و مطالعاتی را تعیین و امنیت این منطقه را در طول مدت اجراء و بهرهبرداری تأمین مینمایند. "
|
||||
# }
|
||||
|
||||
Reference in New Issue
Block a user