|
@@ -1,5 +1,7 @@
|
|
|
import time
|
|
import time
|
|
|
from tihuan import tihuan
|
|
from tihuan import tihuan
|
|
|
|
|
+from tihuan_az import tihuan_az
|
|
|
|
|
+from buchong import buchong
|
|
|
from fuzhu_util import fuzhu_util
|
|
from fuzhu_util import fuzhu_util
|
|
|
from f_youqi import f_youqi
|
|
from f_youqi import f_youqi
|
|
|
import re
|
|
import re
|
|
@@ -17,6 +19,13 @@ from huansuan import callzaihuansuan
|
|
|
import json
|
|
import json
|
|
|
import dedata
|
|
import dedata
|
|
|
import chromadb
|
|
import chromadb
|
|
|
|
|
+from feiyong import feiyong_chaogao
|
|
|
|
|
+from pymongo import MongoClient
|
|
|
|
|
+from anzhuangjsj import anzhuangjsj
|
|
|
|
|
+uri="mongodb://owner:Pheecian1@47.101.198.30:27017/baojia"
|
|
|
|
|
+mongoclient=MongoClient(uri)
|
|
|
|
|
+db = mongoclient['baojia']
|
|
|
|
|
+dbcollection=db['qdxm']
|
|
|
print("chroma")
|
|
print("chroma")
|
|
|
client = chromadb.HttpClient(host='47.101.198.30',port=8000)
|
|
client = chromadb.HttpClient(host='47.101.198.30',port=8000)
|
|
|
collection = client.get_or_create_collection(name="tj_de_bge", metadata={'hnsw:search_ef':15})
|
|
collection = client.get_or_create_collection(name="tj_de_bge", metadata={'hnsw:search_ef':15})
|
|
@@ -27,12 +36,12 @@ qita_collection = client.get_or_create_collection(name="tj_qita_bge")
|
|
|
from FlagEmbedding import FlagModel
|
|
from FlagEmbedding import FlagModel
|
|
|
print("model")
|
|
print("model")
|
|
|
azmodel = FlagModel('/mnt/d/Develop/az/az_encoder_only_base_bge-large-zh-v1.5')
|
|
azmodel = FlagModel('/mnt/d/Develop/az/az_encoder_only_base_bge-large-zh-v1.5')
|
|
|
-model = None # FlagModel('/mnt/d/Develop/az/az_encoder_only_base_bge-large-zh-v1.5')
|
|
|
|
|
-cuoshi_model = None #FlagModel('cuoshi_encoder_only_base_bge-large-zh-v1.5/cuoshi_encoder_only_base_bge-large-zh-v1.5')
|
|
|
|
|
|
|
+model = FlagModel('/mnt/d/Develop/bge/test2_encoder_only_base_bge-large-zh-v1.5')
|
|
|
|
|
+cuoshi_model = FlagModel('cuoshi_encoder_only_base_bge-large-zh-v1.5/cuoshi_encoder_only_base_bge-large-zh-v1.5')
|
|
|
from sentence_transformers import CrossEncoder
|
|
from sentence_transformers import CrossEncoder
|
|
|
-azce = CrossEncoder('/mnt/d/Develop/az/models/reranker-chinese-macbert-large-gooaq-bce-3/final')
|
|
|
|
|
-ce = None #CrossEncoder('/mnt/d/Develop/az/models/reranker-chinese-macbert-large-gooaq-bce/final')
|
|
|
|
|
-cuoshi_ce = None #CrossEncoder('cuoshi_reranker/final')
|
|
|
|
|
|
|
+azce = CrossEncoder('/mnt/d/Develop/az/models/reranker-chinese-macbert-large-gooaq-bce-4/final')
|
|
|
|
|
+ce = CrossEncoder('/mnt/d/Develop/celery/final/final')
|
|
|
|
|
+cuoshi_ce = CrossEncoder('cuoshi_reranker/cuoshi_reranker/final')
|
|
|
with open("hunningtu_rule", "r") as f:
|
|
with open("hunningtu_rule", "r") as f:
|
|
|
content = f.read()
|
|
content = f.read()
|
|
|
obj = json.loads(content)
|
|
obj = json.loads(content)
|
|
@@ -295,34 +304,17 @@ def callzaiclarify(data):
|
|
|
return json_string
|
|
return json_string
|
|
|
def callzaidw(A,B):
|
|
def callzaidw(A,B):
|
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
|
- completion = dsclient.chat.completions.create(
|
|
|
|
|
- # 模型列表:https://help.aliyun.com/zh/model-studio/getting-started/models
|
|
|
|
|
|
|
+ completion = aiclient.chat.completions.create(
|
|
|
model='glm-4.5-air',
|
|
model='glm-4.5-air',
|
|
|
- #model="modelscope.cn/unsloth/GLM-Z1-32B-0414-GGUF",
|
|
|
|
|
- stream=True,
|
|
|
|
|
|
|
+ ##stream=True,
|
|
|
messages=[
|
|
messages=[
|
|
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
|
{"role": "user", "content": " 计量单位可以用名称或者符号表示,常用的符号包括表示米的符号m,表示千米的符号km,表示吨的符号t,表示千克的符号kg,表示平方米的符号m2,表示立方米的符号m3。也有计量单位很宽泛,比如“项”、“次”. 给定一个工作量计量单位,内容为" + A + ",记作A,再给定一个工作量计量单位,内容为" + B + ",记作B。若两个单位相等,请返回A=B。例如,“项”跟“次”是等价的,应返回A=B。若两个单位不相等,但是存在比例换算关系,请返回比例换算关系,例如A单位是m,B单位是10m, 则返回A=0.1*B。再例如,A单位是10m2,B单位是m2,则返回A=10*B。再例如,A单位是m3, B单位是1000m3,则返回A=0.001*B。若两个单位不相等,且不存在比例换算关系,请返回A<>B,例如A单位是m,B单位是m2,一个表示长度,一个表示面积,不存在比例关系,则返回A<>B。 "},
|
|
{"role": "user", "content": " 计量单位可以用名称或者符号表示,常用的符号包括表示米的符号m,表示千米的符号km,表示吨的符号t,表示千克的符号kg,表示平方米的符号m2,表示立方米的符号m3。也有计量单位很宽泛,比如“项”、“次”. 给定一个工作量计量单位,内容为" + A + ",记作A,再给定一个工作量计量单位,内容为" + B + ",记作B。若两个单位相等,请返回A=B。例如,“项”跟“次”是等价的,应返回A=B。若两个单位不相等,但是存在比例换算关系,请返回比例换算关系,例如A单位是m,B单位是10m, 则返回A=0.1*B。再例如,A单位是10m2,B单位是m2,则返回A=10*B。再例如,A单位是m3, B单位是1000m3,则返回A=0.001*B。若两个单位不相等,且不存在比例换算关系,请返回A<>B,例如A单位是m,B单位是m2,一个表示长度,一个表示面积,不存在比例关系,则返回A<>B。 "},
|
|
|
],
|
|
],
|
|
|
- # Qwen3模型通过enable_thinking参数控制思考过程(开源版默认True,商业版默认False)
|
|
|
|
|
- # 使用Qwen3开源版模型时,若未启用流式输出,请将下行取消注释,否则会报错
|
|
|
|
|
- extra_body={"enable_thinking": False},
|
|
|
|
|
- #extra_body={"thinking": {"type": "disabled"}},
|
|
|
|
|
|
|
+ #extra_body={"enable_thinking": False},
|
|
|
|
|
+ extra_body={"thinking": {"type": "disabled"}},
|
|
|
)
|
|
)
|
|
|
- is_answering = False # 是否进入回复阶段
|
|
|
|
|
- print("\n" + "=" * 20 + "思考过程" + "=" * 20)
|
|
|
|
|
- json_string = ""
|
|
|
|
|
- for chunk in completion:
|
|
|
|
|
- delta = chunk.choices[0].delta
|
|
|
|
|
- if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
|
|
|
|
|
- if not is_answering:
|
|
|
|
|
- print(delta.reasoning_content, end="", flush=True)
|
|
|
|
|
- if hasattr(delta, "content") and delta.content:
|
|
|
|
|
- if not is_answering:
|
|
|
|
|
- print("\n" + "=" * 20 + "完整回复" + "=" * 20)
|
|
|
|
|
- is_answering = True
|
|
|
|
|
- json_string = json_string + delta.content#, end="", flush=True)
|
|
|
|
|
- #json_string = completion.choices[0].message.content
|
|
|
|
|
|
|
+ json_string = completion.choices[0].message.content
|
|
|
print(json_string)
|
|
print(json_string)
|
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
|
completion = simpleclient.chat.completions.create(
|
|
completion = simpleclient.chat.completions.create(
|
|
@@ -413,7 +405,7 @@ def zuhe(input, content, bianma):
|
|
|
def huansuan_highlevel(bianma, label, input,dw, tz):
|
|
def huansuan_highlevel(bianma, label, input,dw, tz):
|
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
|
t = huansuan(input, dw, label)
|
|
t = huansuan(input, dw, label)
|
|
|
- if t == 0:
|
|
|
|
|
|
|
+ if t == 0 or bianma.startswith('030901013'):## 灭火器
|
|
|
dw1 = input
|
|
dw1 = input
|
|
|
dw1 = dw1.lower()
|
|
dw1 = dw1.lower()
|
|
|
dw1 = dw1.replace("水平投影面积", "")
|
|
dw1 = dw1.replace("水平投影面积", "")
|
|
@@ -492,6 +484,24 @@ def huansuan(input, dw, label):
|
|
|
return 1
|
|
return 1
|
|
|
if dw1 == '个' and dw2 == '10套':
|
|
if dw1 == '个' and dw2 == '10套':
|
|
|
return 0.1
|
|
return 0.1
|
|
|
|
|
+ if dw1 == '个' and dw2 == '台':
|
|
|
|
|
+ return 1
|
|
|
|
|
+ if dw1 == '个' and dw2 == '10台':
|
|
|
|
|
+ return 0.1
|
|
|
|
|
+ if dw1 == '台' and dw2 == '个':
|
|
|
|
|
+ return 1
|
|
|
|
|
+ if dw1 == '台' and dw2 == '10个':
|
|
|
|
|
+ return 0.1
|
|
|
|
|
+ if dw1 == '台' and dw2 == '套':
|
|
|
|
|
+ return 1
|
|
|
|
|
+ if dw1 == '台' and dw2 == '10套':
|
|
|
|
|
+ return 0.1
|
|
|
|
|
+ if dw1 == '组' and dw2 == '10组':
|
|
|
|
|
+ return 0.1
|
|
|
|
|
+ if dw1 == '组' and dw2 == '套':
|
|
|
|
|
+ return 1
|
|
|
|
|
+ if dw1 == '组' and dw2 == '10套':
|
|
|
|
|
+ return 0.1
|
|
|
if dw1 == 'm' and dw2 == '100m单线':
|
|
if dw1 == 'm' and dw2 == '100m单线':
|
|
|
return 0.01
|
|
return 0.01
|
|
|
|
|
|
|
@@ -616,7 +626,9 @@ def clarify(data):
|
|
|
data['mc']=data['mc'].replace('线条','檐沟')
|
|
data['mc']=data['mc'].replace('线条','檐沟')
|
|
|
data['tz']=data['tz'].replace('线条','檐沟')
|
|
data['tz']=data['tz'].replace('线条','檐沟')
|
|
|
return data, False
|
|
return data, False
|
|
|
-
|
|
|
|
|
|
|
+ elif data['bianma'].startswith('0308'):
|
|
|
|
|
+ data['tz'] = data['tz'].replace('增强柔性石墨板', '增强柔性石墨板制作三通补强圈')
|
|
|
|
|
+ return data, False
|
|
|
else:
|
|
else:
|
|
|
return data, False
|
|
return data, False
|
|
|
|
|
|
|
@@ -636,6 +648,14 @@ def process_data(data:dict)-> dict:
|
|
|
embeddings = model.encode(sentences)
|
|
embeddings = model.encode(sentences)
|
|
|
if data['bianma'].startswith("0117"):
|
|
if data['bianma'].startswith("0117"):
|
|
|
result = cuoshi_collection.query(query_embeddings=embeddings,n_results=25)
|
|
result = cuoshi_collection.query(query_embeddings=embeddings,n_results=25)
|
|
|
|
|
+ elif data['bianma'].startswith('030810'):
|
|
|
|
|
+ result = azcollection.query(query_embeddings=embeddings, n_results=10, where_document={"$contains": "低压法兰"})
|
|
|
|
|
+ elif data['bianma'].startswith('030412'):
|
|
|
|
|
+ result = azcollection.query(query_embeddings=embeddings, n_results=10, where_document={"$contains": "照明器具"})
|
|
|
|
|
+ elif data['bianma'].startswith('030108'):
|
|
|
|
|
+ result = azcollection.query(query_embeddings=embeddings, n_results=10, where_document={"$contains": "风机"})
|
|
|
|
|
+ elif data['bianma'].startswith('030502007') or data['bianma'].startswith('030502008'):
|
|
|
|
|
+ result = azcollection.query(query_embeddings=embeddings, n_results=10, where_document={"$contains": "布放光缆"})
|
|
|
elif data['bianma'].startswith('03'):
|
|
elif data['bianma'].startswith('03'):
|
|
|
result = azcollection.query(query_embeddings=embeddings,n_results=25)
|
|
result = azcollection.query(query_embeddings=embeddings,n_results=25)
|
|
|
else:
|
|
else:
|
|
@@ -791,6 +811,97 @@ def process_data(data:dict)-> dict:
|
|
|
cutoff = score - 0.01
|
|
cutoff = score - 0.01
|
|
|
if cutoff < 0.3:
|
|
if cutoff < 0.3:
|
|
|
cutoff = 0.3
|
|
cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('030408001'):##电力电缆
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '电缆' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ if data['bianma'].startswith('030408006'):##电力电缆头
|
|
|
|
|
+ score = -1
|
|
|
|
|
+ for rank in ranks:
|
|
|
|
|
+ if '电缆头' in d[rank['corpus_id']]:
|
|
|
|
|
+ score = rank['score']
|
|
|
|
|
+ break
|
|
|
|
|
+ if score > -1 and score < cutoff:
|
|
|
|
|
+ cutoff = score - 0.01
|
|
|
|
|
+ if cutoff < 0.3:
|
|
|
|
|
+ cutoff = 0.3
|
|
|
|
|
+ ranks = [x for x in ranks if '电缆头' in d[x['corpus_id']]]
|
|
|
|
|
+ #if data['bianma'].startswith('030108'):##风机安装
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '风机' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('030411'):##配管
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '第四册' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('031001006'):##水管
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '水管' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('030502007') or data['bianma'].startswith('030502008'):##光缆
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '敷设光缆' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('030801'):##低压管道
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '低压管道' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if data['bianma'].startswith('030804'):##低压管件
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '低压管件' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
|
|
+ #if '三通补强圈' in data['tz']:##三通补强圈
|
|
|
|
|
+ # score = -1
|
|
|
|
|
+ # for rank in ranks:
|
|
|
|
|
+ # if '三通补强圈' in d[rank['corpus_id']]:
|
|
|
|
|
+ # score = rank['score']
|
|
|
|
|
+ # break
|
|
|
|
|
+ # if score > -1 and score < cutoff:
|
|
|
|
|
+ # cutoff = score - 0.01
|
|
|
|
|
+ # if cutoff < 0.3:
|
|
|
|
|
+ # cutoff = 0.3
|
|
|
print("cutoff=" + str(cutoff))
|
|
print("cutoff=" + str(cutoff))
|
|
|
for entry in incremental:
|
|
for entry in incremental:
|
|
|
notselected = notselected + incremental[entry]
|
|
notselected = notselected + incremental[entry]
|
|
@@ -841,8 +952,15 @@ def process_data(data:dict)-> dict:
|
|
|
notselected = [x for x in notselected if x not in selected]
|
|
notselected = [x for x in notselected if x not in selected]
|
|
|
selected = list(set(selected))
|
|
selected = list(set(selected))
|
|
|
candidates=[]
|
|
candidates=[]
|
|
|
|
|
+ notselected=[]
|
|
|
for rank in ranks:
|
|
for rank in ranks:
|
|
|
|
|
+ if d[rank['corpus_id']] in notselected:
|
|
|
|
|
+ continue
|
|
|
candidates.append(d[rank['corpus_id']])
|
|
candidates.append(d[rank['corpus_id']])
|
|
|
|
|
+ for entry in basic:
|
|
|
|
|
+ if d[rank['corpus_id']] in basic[entry]:
|
|
|
|
|
+ notselected = notselected + basic[entry]
|
|
|
|
|
+ notselected = [x for x in notselected if x not in candidates]
|
|
|
if len(selected) == 0 and not data['bianma'].startswith('0115'):
|
|
if len(selected) == 0 and not data['bianma'].startswith('0115'):
|
|
|
selected = fallback(candidates, data, aiclient, qwclient, simpleclient, menchuang_collection, model)
|
|
selected = fallback(candidates, data, aiclient, qwclient, simpleclient, menchuang_collection, model)
|
|
|
selected = postprocess(selected, data, aiclient, qwclient,simpleclient, label_name, name_dw, candidates,yqspecial)
|
|
selected = postprocess(selected, data, aiclient, qwclient,simpleclient, label_name, name_dw, candidates,yqspecial)
|
|
@@ -858,8 +976,8 @@ def process_data(data:dict)-> dict:
|
|
|
result = [(x[0], x[1], dedata.read_singledexilie2(10, x[0])) for x in result]
|
|
result = [(x[0], x[1], dedata.read_singledexilie2(10, x[0])) for x in result]
|
|
|
result = [(x[0], x[1], x[2], tihuan(x[0], x[2], label, aiclient, qwclient, simpleclient, data)) for x in result]
|
|
result = [(x[0], x[1], x[2], tihuan(x[0], x[2], label, aiclient, qwclient, simpleclient, data)) for x in result]
|
|
|
else:
|
|
else:
|
|
|
- result = [(x[0], x[1], dedata.read_singledexilie2(30, x[0])) for x in result]
|
|
|
|
|
- result = [(x[0], x[1], x[2], []) for x in result]
|
|
|
|
|
|
|
+ result = [(x[0], x[1], buchong(aiclient, dedata.read_singledexilie2(30, x[0]), x[0], data['tz'])) for x in result]
|
|
|
|
|
+ result = [(x[0], x[1], x[2], tihuan_az(x[0], x[2], label, aiclient, qwclient, simpleclient, data)) for x in result]
|
|
|
fuzhu = [analyze(x[2]) for x in result]
|
|
fuzhu = [analyze(x[2]) for x in result]
|
|
|
fuzhu = zip(selected, fuzhu)
|
|
fuzhu = zip(selected, fuzhu)
|
|
|
fuzhu = [x for x in fuzhu]
|
|
fuzhu = [x for x in fuzhu]
|
|
@@ -876,10 +994,23 @@ def process_data(data:dict)-> dict:
|
|
|
replace['04290303']=extra_info
|
|
replace['04290303']=extra_info
|
|
|
else:
|
|
else:
|
|
|
extra_info = "无"
|
|
extra_info = "无"
|
|
|
|
|
+ fy=[]
|
|
|
|
|
+ if data['bianma'].startswith('03') and '超高' in data['tz']:
|
|
|
|
|
+ fy=feiyong_chaogao(data, [label_name[x] for x in selected], aiclient, qwclient, simpleclient)
|
|
|
|
|
+ if len(fy) > 0:
|
|
|
|
|
+ fy = dedata.read_singledexilie2(30, fy[0])
|
|
|
|
|
+ else:
|
|
|
|
|
+ fy = '{}'
|
|
|
|
|
+ if data['bianma'].startswith('031301017'):##安装脚手架搭拆
|
|
|
|
|
+ print(data['bh'])
|
|
|
|
|
+ print(data['name'])
|
|
|
|
|
+ qd=anzhuangjsj(data['name'], data['bh'], dbcollection)
|
|
|
|
|
+ response = requests.post("http://localhost:3000/api/transform", json={'bianma': data['bianma'], 'mc': data['mc'], 'tz': data['tz'], 'dw': data['dw'], 'sl': data['sl'], 'n': data['n'], "extra": extra_info, 'result':qd, 'fuzhu': [], 'replace': replace, 'fy': fy})
|
|
|
|
|
+ return {"result": response.json()}
|
|
|
if '高强螺栓' in extra_info:
|
|
if '高强螺栓' in extra_info:
|
|
|
- response = requests.post("http://localhost:3000/api/transform", json={'bianma': data['bianma'], 'mc': data['mc'], 'tz': data['tz'], 'dw': data['dw'], 'sl': data['sl'], 'n': data['n'], "extra": extra_info, 'result': [], 'fuzhu': fuzhu_selected, 'replace': replace})
|
|
|
|
|
|
|
+ response = requests.post("http://localhost:3000/api/transform", json={'bianma': data['bianma'], 'mc': data['mc'], 'tz': data['tz'], 'dw': data['dw'], 'sl': data['sl'], 'n': data['n'], "extra": extra_info, 'result': [], 'fuzhu': fuzhu_selected, 'replace': replace, 'fy': '{}'})
|
|
|
return {"result": response.json()}
|
|
return {"result": response.json()}
|
|
|
else:
|
|
else:
|
|
|
- response = requests.post("http://localhost:3000/api/transform", json={'bianma': data['bianma'], 'mc': data['mc'], 'tz': data['tz'], 'dw': data['dw'], 'sl': data['sl'], 'n': data['n'], "extra": extra_info, 'result': result, 'fuzhu': fuzhu_selected, 'replace': replace})
|
|
|
|
|
|
|
+ response = requests.post("http://localhost:3000/api/transform", json={'bianma': data['bianma'], 'mc': data['mc'], 'tz': data['tz'], 'dw': data['dw'], 'sl': data['sl'], 'n': data['n'], "extra": extra_info, 'result': result, 'fuzhu': fuzhu_selected, 'replace': replace, 'fy': fy})
|
|
|
return {"result": response.json()}
|
|
return {"result": response.json()}
|
|
|
|
|
|