Machine Learning Service for the Memotions Application. This service provides APIs for accessing the Memotions machine learning models, the handling integration between machine learning models and the application's features.
This API is built with FastAPI and served using Uvicorn. The service listens for Pub/Sub events to trigger its execution. Its primary task is to predict emotions from user journals and generate feedback based on them. We use a model developed by our ML team to predict the emotions, and a fine-tuned model with Vertex AI to generate the feedback. The results are then published to a Pub/Sub event.
- FastApi
- Tensorflow
- Pubsub
- Cloud Storage
- Vertex AI
You can access the full API documentation here:
Memotions ML API Docs
- Clone the Repository
git clone https://github.com/memotions/ml-service.git
cd ml-service/- Create .env file
cp .env.example .env
vi .env
# add environment variables- Install Dependencies
pip install -r requirements.txt- Run the Server
# change host to localhost if want to try in your local
uvicorn app.main:app --host 0.0.0.0 --port 8000 --log-config logging_config.json