import click
import logging
import asyncio
from dotenv import load_dotenv

import server

import torch


@click.command()
def main():
    """MarketMinds AI Services
    Contains the following services for the MarketMinds Application:
    - Sentiment Analysis 50051
    - Named Entity Recognition 50052
    
    This application interacts with the use of gRPC to communicate with the
    MarketMinds API.
    """
    torch.backends.cuda.matmul.allow_tf32 = True

    load_dotenv()
    logging.basicConfig(level=logging.INFO)

    asyncio.run(server.serve())

if __name__ == "__main__":
    main()