remove unneeded code for running in docker container
This commit is contained in:
+3
-10
@@ -1,25 +1,18 @@
|
|||||||
"""Main script to be run by service."""
|
"""Main script to be run by service."""
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
|
||||||
from models import VisualCommunicationModel
|
from models import VisualCommunicationModel
|
||||||
from torchinfo import summary
|
|
||||||
from utils import load_model
|
from utils import load_model
|
||||||
|
|
||||||
from shared.data_store import connect
|
from shared.data_store import connect
|
||||||
from shared.utils import setup_logging
|
from shared.utils import setup_logging
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# load in env file
|
|
||||||
env_path = Path(__file__).parent.parent.parent / 'server.env'
|
|
||||||
load_dotenv(env_path)
|
|
||||||
# setup logging
|
# setup logging
|
||||||
setup_logging()
|
setup_logging()
|
||||||
# connect to minio
|
# connect to minio
|
||||||
minio_client = connect()
|
minio_client = connect()
|
||||||
# instantiate model
|
# instantiate model
|
||||||
model: VisualCommunicationModel = load_model(client=minio_client)
|
model: VisualCommunicationModel = load_model(client=minio_client)
|
||||||
# show model weights
|
# get image
|
||||||
summary(model)
|
|
||||||
print('loaded model')
|
# make prediction
|
||||||
|
|||||||
Reference in New Issue
Block a user