diff --git a/.gitignore b/.gitignore index d3000cd..7d6e743 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ group*-shard* models final_model wandb -cert \ No newline at end of file +cert +venv/ +nakdimon.egg* \ No newline at end of file diff --git a/examples/usage.py b/examples/usage.py new file mode 100644 index 0000000..f5e1e07 --- /dev/null +++ b/examples/usage.py @@ -0,0 +1,7 @@ +# pip install git+https://github.com/thewh1teagle/nakdimon@feat/python-package +# wget https://github.com/elazarg/nakdimon/raw/master/models/Nakdimon.h5 + +import nakdimon + +result = nakdimon.predict("Nakdimon.h5", "שלום עולם!") +print(result) \ No newline at end of file diff --git a/nakdimon/__init__.py b/nakdimon/__init__.py new file mode 100644 index 0000000..004086b --- /dev/null +++ b/nakdimon/__init__.py @@ -0,0 +1,3 @@ +from .predict import predict + +__all__ = ['predict'] \ No newline at end of file diff --git a/nakdimon/dataset.py b/nakdimon/dataset.py index 76c76f1..caab32c 100644 --- a/nakdimon/dataset.py +++ b/nakdimon/dataset.py @@ -3,8 +3,8 @@ import random import numpy as np -import hebrew -import utils +from nakdimon import hebrew, utils + class CharacterTable: diff --git a/nakdimon/hebrew.py b/nakdimon/hebrew.py index 6309e34..9a87fe1 100644 --- a/nakdimon/hebrew.py +++ b/nakdimon/hebrew.py @@ -6,7 +6,7 @@ from functools import lru_cache import re -import utils +from nakdimon import utils # "rafe" denotes a letter to which it would have been valid to add a diacritic of some category diff --git a/nakdimon/predict.py b/nakdimon/predict.py index aace3d8..c1927aa 100644 --- a/nakdimon/predict.py +++ b/nakdimon/predict.py @@ -3,9 +3,7 @@ import tensorflow as tf -import utils -import dataset -import hebrew +from nakdimon import utils, dataset, hebrew if tf.config.set_visible_devices([], 'GPU'): diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6653e3d --- /dev/null +++ b/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup, find_packages + +setup( + name='nakdimon', + version='0.1.0', + packages=find_packages(), + install_requires=[ + "numpy==1.24.1", + "tensorflow==2.13.0", + "wandb==0.17.0" + ], +) \ No newline at end of file