def predict(): """ @summary: 预测数据 """ test_x,doc_id,ent_id,sen,ent_text,dianhua = get_data() model = models.load_model("model_person.model", custom_objects={'precision': precision, 'recall': recall, 'f1_score': f1_score} ) predict_y = model.predict([test_x[0], test_x[1]]) label = [np.argmax(y) for y in predict_y]