Skip to content
API for Machine Learning
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
docs
models
.env-dist
.gitignore
README.md
api.py
requirements.txt
uvicorn.sh

README.md

Machine Learning API

API docs

Projects

Klitschko brothers image classifier

Predict who of two brothers is on the photo

Odds Generator

The are multiple markets you can bet on sports events. But there are several markets which could be used to generate other markets. Based on these main markets: Match Result Full Time (MRFT), Over/Under Full Time 2.5(OUFT) and Both Teams to Score (BTS) we are going to generate other markets e.g Double Chance Full Time (DCFT), Match Result Half Time (MRHT) or Match Result Second Half (MRSH)

Technical details

Running uvicorn as a systemd service

Edit /etc/systemd/system/mlapi.uvicorn.service

[Unit]
Description=uvicorn server for machine learning api
After=network.target

[Service]
User=viktor
Group=nginx
ExecStart=/var/www/vhosts/mlapi/uvicorn.sh

Start the service

sudo service klitschko.uvicorn.service start

Running behind nginx

Edit /etc/nginx/conf.d/ml.viktors.info.conf

server {
    listen 80;
    client_max_body_size 4G;

    server_name ml.viktors.info;

    location / {
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_redirect off;
      proxy_buffering off;
      proxy_pass http://localhost:8000;
    }
}
upstream uvicorn {
    server unix:/tmp/uvicorn.sock;
}

Examples

Resources

You can’t perform that action at this time.