├── dashboard ├── __init__.py ├── migrations │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-39.pyc │ │ ├── 0001_initial.cpython-39.pyc │ │ ├── 0002_auto_20210720_1231.cpython-39.pyc │ │ ├── 0003_auto_20210720_1231.cpython-39.pyc │ │ ├── 0004_auto_20210720_1236.cpython-39.pyc │ │ └── 0005_auto_20210720_1249.cpython-39.pyc │ ├── 0005_auto_20210720_1249.py │ ├── 0003_auto_20210720_1231.py │ ├── 0002_auto_20210720_1231.py │ ├── 0004_auto_20210720_1236.py │ └── 0001_initial.py ├── tests.py ├── apps.py ├── __pycache__ │ ├── apps.cpython-39.pyc │ ├── urls.cpython-39.pyc │ ├── admin.cpython-39.pyc │ ├── forms.cpython-39.pyc │ ├── models.cpython-39.pyc │ ├── views.cpython-39.pyc │ └── __init__.cpython-39.pyc ├── forms.py ├── urls.py ├── admin.py ├── views.py └── models.py ├── sportpredictor ├── __init__.py ├── __pycache__ │ ├── urls.cpython-39.pyc │ ├── wsgi.cpython-39.pyc │ ├── __init__.cpython-39.pyc │ └── settings.cpython-39.pyc ├── asgi.py ├── wsgi.py ├── urls.py └── settings.py ├── db.sqlite3 ├── ml_model └── ml_sport_model.joblib ├── templates ├── partials │ ├── nav.html │ └── base.html └── dashboard │ ├── index.html │ └── predictions.html └── manage.py /dashboard/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sportpredictor/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dashboard/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dashboard/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /dashboard/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DashboardConfig(AppConfig): 5 | name = 'dashboard' 6 | -------------------------------------------------------------------------------- /ml_model/ml_sport_model.joblib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/ml_model/ml_sport_model.joblib -------------------------------------------------------------------------------- /dashboard/__pycache__/apps.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/apps.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/admin.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/admin.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/forms.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/forms.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/models.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/models.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/views.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/views.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /sportpredictor/__pycache__/urls.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/sportpredictor/__pycache__/urls.cpython-39.pyc -------------------------------------------------------------------------------- /sportpredictor/__pycache__/wsgi.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/sportpredictor/__pycache__/wsgi.cpython-39.pyc -------------------------------------------------------------------------------- /sportpredictor/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/sportpredictor/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /sportpredictor/__pycache__/settings.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/sportpredictor/__pycache__/settings.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/0001_initial.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Data 3 | 4 | 5 | class DataForm(forms.ModelForm): 6 | class Meta: 7 | model = Data 8 | fields = ['name', 'age', 'height', 'sex'] 9 | -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0002_auto_20210720_1231.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/0002_auto_20210720_1231.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0003_auto_20210720_1231.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/0003_auto_20210720_1231.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0004_auto_20210720_1236.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/0004_auto_20210720_1236.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/migrations/__pycache__/0005_auto_20210720_1249.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KenBroTech/Simple-Django-Machine-Learning-Project/HEAD/dashboard/migrations/__pycache__/0005_auto_20210720_1249.cpython-39.pyc -------------------------------------------------------------------------------- /dashboard/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .import views 3 | 4 | urlpatterns = [ 5 | path('', views.index, name='dashboard-index'), 6 | path('predictions/', views.predictions, name='dashboard-predictions'), 7 | ] 8 | -------------------------------------------------------------------------------- /dashboard/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Data 3 | 4 | # Register your models here. 5 | 6 | 7 | class DataAdmin(admin.ModelAdmin): 8 | list_display = ('name', 'age', 'height', 'sex', 'predictions') 9 | 10 | 11 | admin.site.register(Data, DataAdmin) 12 | -------------------------------------------------------------------------------- /templates/partials/nav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sportpredictor/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for sportpredictor project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sportpredictor.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /sportpredictor/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for sportpredictor project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sportpredictor.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /dashboard/migrations/0005_auto_20210720_1249.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-07-20 11:49 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0004_auto_20210720_1236'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RenameField( 14 | model_name='data', 15 | old_name='predicitions', 16 | new_name='predictions', 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /dashboard/migrations/0003_auto_20210720_1231.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-07-20 11:31 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0002_auto_20210720_1231'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='data', 15 | name='sex', 16 | field=models.PositiveIntegerField(choices=[(0, 'Female'), (1, 'Male')], null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /dashboard/migrations/0002_auto_20210720_1231.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-07-20 11:31 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('dashboard', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='data', 15 | name='sex', 16 | field=models.PositiveIntegerField(choices=[(0, 'Female'), (1, 'Male')], max_length=10, null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /dashboard/migrations/0004_auto_20210720_1236.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-07-20 11:36 2 | 3 | import django.core.validators 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('dashboard', '0003_auto_20210720_1231'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='data', 16 | name='age', 17 | field=models.PositiveIntegerField(null=True, validators=[django.core.validators.MinValueValidator(13), django.core.validators.MaxValueValidator(19)]), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /templates/dashboard/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'partials/base.html' %} 2 | {% block title %}Home{% endblock %} 3 | {% load crispy_forms_tags %} 4 | {% block content %} 5 |
| Name | 12 |Age | 13 |Height | 14 |Sex | 15 |Prediction | 16 |
|---|---|---|---|---|
| {{ data.name }} | 22 |{{ data.age }} | 23 |{{ data.height }} | 24 |{{ data.sex }} | 25 |{{ data.predictions }} | 26 |