Skip to content

Commit

Permalink
fix db issue
Browse files Browse the repository at this point in the history
  • Loading branch information
atharvakale343 committed Oct 9, 2024
1 parent 4dc2489 commit 11520b5
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 108 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "pypi"
pydantic = "~=2.9"
flask-ml = "0.0.9"
colorama = "*"
tqdm = "*"

[dev-packages]
black = "~=24.8"
Expand Down
208 changes: 109 additions & 99 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions cmd_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
from small_blk_forensics.utils.data import MyModelResponse


def _ensure_output_file_path(path: Path):
path.parent.mkdir(parents=True, exist_ok=True)


def _print_results(result: MyModelResponse, args: argparse.Namespace):
print()
print("Results:")
Expand All @@ -27,7 +23,6 @@ def _print_results(result: MyModelResponse, args: argparse.Namespace):

def combined_parser_func(args: argparse.Namespace):
output_sql_file = Path(args.output_sql)
_ensure_output_file_path(output_sql_file)

model = SmallBlockForensicsModel(args.block_size, args.target_probability)
result = model.run_with_known_content_directory(
Expand All @@ -39,7 +34,6 @@ def combined_parser_func(args: argparse.Namespace):

def gen_hash_parser_func(args: argparse.Namespace):
output_sql = Path(args.output_sql)
_ensure_output_file_path(output_sql)

model = SmallBlockForensicsModel(args.block_size)
model.hash_directory(Path(args.known_content_directory), output_sql)
Expand Down
Loading

0 comments on commit 11520b5

Please sign in to comment.