This is a project of Samurai Technology. Contact us at hi@samurai.technology.
Smart Popup provides an advice whether to show or not a pop-up. The advice is based on ML models trained on website's users activity data. Smart Popup currently supports 2 models:
Initial model
: model based on user initial data, which can be recorded when a user enters a websiteActivity model
: model based on initial model data and user activity events
Production models of Smart Popup are not open sourced as they are created based on a client's data. Dummy models are provided for test and tutorial purposes.
To run Smart Popup with custom models:
- Serialize your models with directory
pickle
. - Configure path to serialized models in
App/config.ini
file (MODELS) - Register deserialized models in ModelsRegistry before starting the server.
- Optional: populate database with custom data (constants), for instance: discrete values from model's input variable
space (e.g.
device_categories = ["desktop", "mobile", "tablet"]
). Seetests/dbPopulator/DBPopulator.py
for an example. This data can be used while utilizing the models during the request. - Provide predictors for initial and activity requests. Predictor is a function from data populated in
point 3., request body and ModelsRegistry into an advice for the request. Register predictors in
PredictorsRegistry
and use them inDecisionService
.Predictor.predict(...)
should be a pure function. Seepredictors
package for an example.
- Create docker network:
./bin/docker-create-network.sh
- Create backend image:
./bin/docker-build-backend.sh
- Run database:
./bin/docker-run-database.sh
- Run backend:
./bin/docker-run-backend.sh
Server will be available at localhost:8888
.
Smart Popup can be used to update a flag deciding whether to show a popup to a current website's user. Workflow schema:
While installing new dependencies, remember to update app/requirements.txt
file.