Skip to content

Commit

Permalink
Allow calling interactive predictor file directly
Browse files Browse the repository at this point in the history
  • Loading branch information
HazardousPeach committed Feb 13, 2023
1 parent 291d228 commit ccb49c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/interactive_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
##########################################################################

import argparse
from pathlib_revised import Path2
import sys
from pathlib import Path
from typing import List

from predict_tactic import loadPredictorByFile
Expand Down Expand Up @@ -49,7 +50,7 @@ def input_list() -> List[str]:
def predict(args: List[str]) -> None:
parser = argparse.ArgumentParser(
description="Proverbot9001 interactive prediction model")
parser.add_argument("weightsfile", default=None, type=Path2)
parser.add_argument("weightsfile", default=None, type=Path)
parser.add_argument("-k", "--num-predictions", default=5)
parser.add_argument("--print-certainties", action='store_true')
arg_values = parser.parse_args(args[:1])
Expand Down Expand Up @@ -92,3 +93,6 @@ def predict(args: List[str]) -> None:
print(prediction.prediction)

pass

if __name__ == "__main__":
predict(sys.argv[1:])

0 comments on commit ccb49c5

Please sign in to comment.