Skip to content

Commit

Permalink
fix memory leak error
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezade authored and alirezade committed Jan 31, 2024
1 parent 1ed1da3 commit f06a6c8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ProcessAnnotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ def process(self, flow):
self.__set_label(flow)

def __predict_label(self, flow):
pass
# df = pd.DataFrame(columns=flow.parameters.keys(), data=[flow.parameters.values()])
# df.replace('', np.nan, inplace=True)
# y_pred = self.ml_model.predict_proba(df, verbose=0)
# y_pred_classes = np.argmax(y_pred, axis=0)
df = pd.DataFrame(columns=flow.parameters.keys(), data=[flow.parameters.values()])
df.replace('', np.nan, inplace=True)
y_pred = self.ml_model.predict_proba(df, verbose=0)
y_pred_classes = np.argmax(y_pred, axis=0)
# flow.add_parameter(Config.Texts.Prediction, self.label_index[str(y_pred_classes)])
# flow.add_parameter(Config.Texts.prediction_confidence, str(y_pred[y_pred_classes]))

Expand Down

0 comments on commit f06a6c8

Please sign in to comment.