You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.1 KiB
29 lines
1.1 KiB
1 year ago
|
from ner_1.panjueshu.main import panjueshu
|
||
|
from ner_1.qisushu.main import qisushu
|
||
|
from ner_1.liangxingjianyishu.main import liangxingjianyishu
|
||
|
from ner_1.qisuyijianshu.main import qisuyijianshu
|
||
|
|
||
|
class controller():
|
||
|
def __init__(self,token):
|
||
|
self.token=token
|
||
|
self.access=False
|
||
|
self.jy_token()
|
||
|
def jy_token(self):
|
||
|
self.access=True
|
||
|
return True
|
||
|
def controller_panjueshu(self,data):
|
||
|
if(self.access==False):
|
||
|
return {"code":203,"data":[],"msg":"未授权"}
|
||
|
return panjueshu().predict(data['text_list'])
|
||
|
def controller_qisushu(self,data):
|
||
|
if(self.access==False):
|
||
|
return {"code":203,"data":[],"msg":"未授权"}
|
||
|
return qisushu().predict(data['text_list'])
|
||
|
def controller_liangxingjianyishu(self,data):
|
||
|
if(self.access==False):
|
||
|
return {"code":203,"data":[],"msg":"未授权"}
|
||
|
return liangxingjianyishu().predict(data['text_list'])
|
||
|
def controller_qisuyijianshu(self,data):
|
||
|
if(self.access==False):
|
||
|
return {"code":203,"data":[],"msg":"未授权"}
|
||
|
return qisuyijianshu().predict(data['text_list'])
|