diff --git a/locimend/__init__.py b/locimend/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/api.py b/locimend/api.py similarity index 80% rename from src/api.py rename to locimend/api.py index 1f069b5..13bdb05 100644 --- a/src/api.py +++ b/locimend/api.py @@ -1,7 +1,8 @@ from fastapi import FastAPI from pydantic import BaseModel +from uvicorn import run -from model import infer_sequence +from locimend.model import infer_sequence app = FastAPI() @@ -20,3 +21,7 @@ async def get_sequence_path(sequence: str): async def get_sequence_body(sequence: Input): correct_sequence = await infer_sequence(sequence.sequence) return {"sequence": correct_sequence} + + +def main(): + run(app, host="0.0.0.0") diff --git a/src/hyperparameters.py b/locimend/hyperparameters.py similarity index 100% rename from src/hyperparameters.py rename to locimend/hyperparameters.py diff --git a/src/main.py b/locimend/main.py similarity index 100% rename from src/main.py rename to locimend/main.py diff --git a/src/model.py b/locimend/model.py similarity index 94% rename from src/model.py rename to locimend/model.py index 413b683..d44b6ae 100644 --- a/src/model.py +++ b/locimend/model.py @@ -10,8 +10,13 @@ from tensorflow.keras.optimizers import Adam from tensorflow.keras.regularizers import l2 from tensorflow.random import set_seed -from hyperparameters import Hyperparameters -from preprocessing import BASES, dataset_creation, decode_sequence, encode_sequence +from locimend.hyperparameters import Hyperparameters +from locimend.preprocessing import ( + BASES, + dataset_creation, + decode_sequence, + encode_sequence, +) def build_model(hyperparams) -> Model: diff --git a/src/preprocessing.py b/locimend/preprocessing.py similarity index 100% rename from src/preprocessing.py rename to locimend/preprocessing.py