Compare commits
2 Commits
6cd9445e17
...
20170200aa
Author | SHA1 | Date |
---|---|---|
coolneng | 20170200aa | |
coolneng | b0503e8f1c |
|
@ -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")
|
|
@ -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:
|
|
@ -16,6 +16,9 @@ uvicorn = "^0.14.0"
|
|||
isort = "^5.8.0"
|
||||
pyflakes = "^2.3.1"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
api = "locimend.api:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
|
Loading…
Reference in New Issue