mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Allow reuse of get_absolute_path, is_none_or_empty methods
- Move them to utils.helper.py for reuse - Import those modules where required - Delete duplicate methods defined in org_to_jsonl.py, asymmetric.py
This commit is contained in:
@@ -10,7 +10,7 @@ import re
|
||||
import torch
|
||||
import argparse
|
||||
import pathlib
|
||||
|
||||
from utils.helpers import get_absolute_path
|
||||
|
||||
def initialize_model():
|
||||
"Initialize model for assymetric semantic search. That is, where query smaller than results"
|
||||
@@ -140,10 +140,6 @@ def collate_results(hits, entries, count=5):
|
||||
in hits[0:count]]
|
||||
|
||||
|
||||
def get_absolute_path(filepath):
|
||||
return str(pathlib.Path(filepath).expanduser().absolute())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Setup Argument Parser
|
||||
parser = argparse.ArgumentParser(description="Map Org-Mode notes into (compressed) JSONL format")
|
||||
|
||||
Reference in New Issue
Block a user