From 13ffb6da8c684f31d82b677cb3f59d35620fc44e Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 10:46:28 -0600 Subject: [PATCH 01/12] Update requirements.txt --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0855d0de0..54cd24159 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,10 @@ aiofiles==0.5.0 aiohttp==3.6.2 asyncio==3.4.3 fastai==1.0.61 -torch==1.6.0 -torchvision==0.7.0 -numpy==1.19.0 -pillow~=7.2 +torch==1.4.0 +torchvision==0.5.0 +numpy==1.15.4 +pillow~=5.4.1 python-multipart==0.0.5 starlette==0.13.6 uvicorn==0.11.7 From 8616f2e168aa632ef65bbf79919a32151716e474 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 10:50:29 -0600 Subject: [PATCH 02/12] Update server.py --- app/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server.py b/app/server.py index fc713eaba..a69db1f37 100644 --- a/app/server.py +++ b/app/server.py @@ -9,10 +9,10 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://www.dropbox.com/s/6bgq8t6yextloqp/export.pkl?raw=1' +export_file_url = 'https://drive.google.com/uc?export=download&id=1EXIrm0PYJ5-nFWnNgWkWTx9yFdgp_niW' export_file_name = 'export.pkl' -classes = ['black', 'grizzly', 'teddys'] +classes = ['alienware', 'macbook', 'razer'] path = Path(__file__).parent app = Starlette() From 538ac7c8127996f0b23bb27b612a5cfed442c891 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 11:25:03 -0600 Subject: [PATCH 03/12] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 54cd24159..411505a77 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ fastai==1.0.61 torch==1.4.0 torchvision==0.5.0 numpy==1.15.4 -pillow~=5.4.1 +pillow==5.4.1 python-multipart==0.0.5 starlette==0.13.6 uvicorn==0.11.7 From 3c6f587441532c82c81f268a3750d8ff4f606321 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 11:45:27 -0600 Subject: [PATCH 04/12] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 411505a77..13761f0cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ fastai==1.0.61 torch==1.4.0 torchvision==0.5.0 numpy==1.15.4 -pillow==5.4.1 +pillow==7.2 python-multipart==0.0.5 starlette==0.13.6 uvicorn==0.11.7 From 036d5fd1bf1ebf2b43fba75bedc525c0d4f76e15 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 12:17:26 -0600 Subject: [PATCH 05/12] Update server.py --- app/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server.py b/app/server.py index a69db1f37..12c16e10e 100644 --- a/app/server.py +++ b/app/server.py @@ -2,7 +2,7 @@ import asyncio import uvicorn from fastai import * -from fastai.vision import * +from fastai.vision import load_learner from io import BytesIO from starlette.applications import Starlette from starlette.middleware.cors import CORSMiddleware From 7af038295e256fd4a53177f433ca749a933c8004 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 12:25:05 -0600 Subject: [PATCH 06/12] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 13761f0cb..c2242fac7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ asyncio==3.4.3 fastai==1.0.61 torch==1.4.0 torchvision==0.5.0 -numpy==1.15.4 +numpy==1.19.0 pillow==7.2 python-multipart==0.0.5 starlette==0.13.6 From 0ef89d5180d5b7e6f9b82b983a762a68e4b7883e Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 17:06:55 -0600 Subject: [PATCH 07/12] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index c2242fac7..4dc092bfc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,7 @@ fastai==1.0.61 torch==1.4.0 torchvision==0.5.0 numpy==1.19.0 +pandas==1.1.1 pillow==7.2 python-multipart==0.0.5 starlette==0.13.6 From d0e60c7a6c777cba5d1308a484c786c55857935e Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 17:09:26 -0600 Subject: [PATCH 08/12] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4dc092bfc..c2242fac7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,6 @@ fastai==1.0.61 torch==1.4.0 torchvision==0.5.0 numpy==1.19.0 -pandas==1.1.1 pillow==7.2 python-multipart==0.0.5 starlette==0.13.6 From 7259e46c2c7ec8ac5f3cb9cc55cc7916384d1ef6 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 17:21:20 -0600 Subject: [PATCH 09/12] Update server.py --- app/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/server.py b/app/server.py index 12c16e10e..acf08905f 100644 --- a/app/server.py +++ b/app/server.py @@ -4,6 +4,7 @@ from fastai import * from fastai.vision import load_learner from io import BytesIO +from pathlib import Path from starlette.applications import Starlette from starlette.middleware.cors import CORSMiddleware from starlette.responses import HTMLResponse, JSONResponse From e8b4b617633e2f7786141df989669f1f54a60c07 Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 17:25:05 -0600 Subject: [PATCH 10/12] Import all dependencies --- app/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/server.py b/app/server.py index acf08905f..688b81d91 100644 --- a/app/server.py +++ b/app/server.py @@ -9,6 +9,7 @@ from starlette.middleware.cors import CORSMiddleware from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles +import sys export_file_url = 'https://drive.google.com/uc?export=download&id=1EXIrm0PYJ5-nFWnNgWkWTx9yFdgp_niW' export_file_name = 'export.pkl' From b28c5e87728ba5abb75cdec22d91bbba615e659a Mon Sep 17 00:00:00 2001 From: M1lkChocolate <58788037+M1lkChocolate@users.noreply.github.com> Date: Mon, 24 Aug 2020 17:41:41 -0600 Subject: [PATCH 11/12] Update server.py --- app/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server.py b/app/server.py index 688b81d91..a31b9600e 100644 --- a/app/server.py +++ b/app/server.py @@ -2,7 +2,7 @@ import asyncio import uvicorn from fastai import * -from fastai.vision import load_learner +from fastai.vision import * from io import BytesIO from pathlib import Path from starlette.applications import Starlette From 025a3ae258675b37bde20103fedb92499db9fa56 Mon Sep 17 00:00:00 2001 From: jmdarnel Date: Mon, 24 Aug 2020 20:15:08 -0600 Subject: [PATCH 12/12] Customized site colors and erased teddy bear example --- app/static/style.css | 10 +++++----- app/view/index.html | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/app/static/style.css b/app/static/style.css index b1065f8de..a67b21568 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -1,5 +1,5 @@ body { - background-color: #fff; + background-color: rgb(77, 74, 74); } .no-display { @@ -17,7 +17,7 @@ body { font-size: 30px; margin-top: 1em; margin-bottom: 1em; - color: #262626; + color: #43b643b6; } .content { @@ -43,10 +43,10 @@ button.choose-file-button { width: 200px; height: 40px; border-radius: 2px; - background-color: #ffffff; - border: solid 1px #7052CB; + background-color: #69666669; + border: solid 1px rgb(0, 0, 0); font-size: 13px; - color: #7052CB; + color: #43b643b6; } button.analyze-button { diff --git a/app/view/index.html b/app/view/index.html index 6642e26f5..3e336106e 100644 --- a/app/view/index.html +++ b/app/view/index.html @@ -7,10 +7,14 @@
-
Classify Bear Images 🐻
+
Accurately Identify Laptop Brands

- Use images of teddy bears, black bears, grizzly bears, or - all three! + Use images of Macbooks, Razer Blades, + Alienwares, or all three! +

+

+ This classifier was built as a personal project inspired by Lesson 2 + of the fastai course v3 (2019).