Rename src folder to locimend

This commit is contained in:
coolneng 2021-07-06 19:51:51 +02:00
parent 6cd9445e17
commit b0503e8f1c
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
6 changed files with 13 additions and 3 deletions

0
locimend/__init__.py Normal file
View File

View File

@ -1,7 +1,8 @@
from fastapi import FastAPI from fastapi import FastAPI
from pydantic import BaseModel from pydantic import BaseModel
from uvicorn import run
from model import infer_sequence from locimend.model import infer_sequence
app = FastAPI() app = FastAPI()
@ -20,3 +21,7 @@ async def get_sequence_path(sequence: str):
async def get_sequence_body(sequence: Input): async def get_sequence_body(sequence: Input):
correct_sequence = await infer_sequence(sequence.sequence) correct_sequence = await infer_sequence(sequence.sequence)
return {"sequence": correct_sequence} return {"sequence": correct_sequence}
def main():
run(app, host="0.0.0.0")

View File

@ -10,8 +10,13 @@ from tensorflow.keras.optimizers import Adam
from tensorflow.keras.regularizers import l2 from tensorflow.keras.regularizers import l2
from tensorflow.random import set_seed from tensorflow.random import set_seed
from hyperparameters import Hyperparameters from locimend.hyperparameters import Hyperparameters
from preprocessing import BASES, dataset_creation, decode_sequence, encode_sequence from locimend.preprocessing import (
BASES,
dataset_creation,
decode_sequence,
encode_sequence,
)
def build_model(hyperparams) -> Model: def build_model(hyperparams) -> Model: