From 59c6de1285bae8b299606feb525c9f753e8a59c6 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Tue, 11 Aug 2020 16:29:16 +0530 Subject: [PATCH 01/21] 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..5924620af 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=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' export_file_name = 'export.pkl' -classes = ['black', 'grizzly', 'teddys'] +classes = ['social_dist', 'no_social_dist'] path = Path(__file__).parent app = Starlette() From d5602e0ce6a4373f5f9157c6e9b62eeef6f2c7ea Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Tue, 11 Aug 2020 17:02:14 +0530 Subject: [PATCH 02/21] 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 5924620af..595d7a88b 100644 --- a/app/server.py +++ b/app/server.py @@ -9,7 +9,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://drive.google.com/uc?export=download&id=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' +export_file_url = 'https://drive.google.com/u/0/uc?export=download&confirm=TZ0s&id=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' export_file_name = 'export.pkl' classes = ['social_dist', 'no_social_dist'] From bd7dacd868f1ed3e2a26877f7091ec3728a85581 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Tue, 11 Aug 2020 18:12:49 +0530 Subject: [PATCH 03/21] 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 595d7a88b..5924620af 100644 --- a/app/server.py +++ b/app/server.py @@ -9,7 +9,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://drive.google.com/u/0/uc?export=download&confirm=TZ0s&id=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' +export_file_url = 'https://drive.google.com/uc?export=download&id=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' export_file_name = 'export.pkl' classes = ['social_dist', 'no_social_dist'] From 81df88c7dd7bed3232aeec88ae0608d074b66d65 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Tue, 11 Aug 2020 18:49:26 +0530 Subject: [PATCH 04/21] 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 5924620af..523a92be3 100644 --- a/app/server.py +++ b/app/server.py @@ -9,7 +9,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://drive.google.com/uc?export=download&id=15_OWVDX-tehr1Z-3XKstRbN4i5XoLqym' +export_file_url = 'https://www.dropbox.com/s/azoha55knyin8jg/export.pkl?dl=1' export_file_name = 'export.pkl' classes = ['social_dist', 'no_social_dist'] From 41e47165a74c7fbb8aaa160cfbd84c38a0ff7ec5 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 20:54:42 +0530 Subject: [PATCH 05/21] Update requirements.txt --- requirements.txt | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0855d0de0..9de119cfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,14 @@ -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 -python-multipart==0.0.5 -starlette==0.13.6 -uvicorn==0.11.7 +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile +# +https://download.pytorch.org/whl/cpu/torch-1.5.1%2Bcpu-cp36-cp36m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torchvision-0.6.1%2Bcpu-cp36-cp36m-linux_x86_64.whl +fastai +ipywidgets +voila +pandas +numpy +sklearn From d36bd905879d1b680ec6afa2a63e487af275fde5 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 21:01:52 +0530 Subject: [PATCH 06/21] Create Procfile --- Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 000000000..cf1213167 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python app/server.py serve From c77746e391323239737d95e7ec4c1243981ec816 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 21:02:50 +0530 Subject: [PATCH 07/21] Create runtime.txt --- runtime.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 runtime.txt diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 000000000..03a934b56 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.7.7 From 9ff1f128c598d382d3aac280183575f0121d9274 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 21:04:05 +0530 Subject: [PATCH 08/21] Update requirements.txt --- requirements.txt | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9de119cfe..1a7f25c2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,11 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile -# -https://download.pytorch.org/whl/cpu/torch-1.5.1%2Bcpu-cp36-cp36m-linux_x86_64.whl -https://download.pytorch.org/whl/cpu/torchvision-0.6.1%2Bcpu-cp36-cp36m-linux_x86_64.whl -fastai -ipywidgets -voila -pandas -numpy -sklearn +aiofiles==0.4.0 +aiohttp==3.5.4 +asyncio==3.4.3 +fastai==1.0.52 +https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl +numpy==1.16.3 +pillow~=7.1.0 +python-multipart==0.0.5 +starlette==0.12.0 +uvicorn==0.11.7 From 65232d3ae97ed4155d3cb9ecef95b7de87571dbb Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 21:06:52 +0530 Subject: [PATCH 09/21] Update server.py --- app/server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/server.py b/app/server.py index 523a92be3..216a54fc3 100644 --- a/app/server.py +++ b/app/server.py @@ -1,6 +1,8 @@ import aiohttp import asyncio import uvicorn +import os +import requests from fastai import * from fastai.vision import * from io import BytesIO @@ -12,6 +14,8 @@ export_file_url = 'https://www.dropbox.com/s/azoha55knyin8jg/export.pkl?dl=1' export_file_name = 'export.pkl' +Port = int(os.environ.get('PORT', 50000)) + classes = ['social_dist', 'no_social_dist'] path = Path(__file__).parent @@ -66,4 +70,4 @@ async def analyze(request): if __name__ == '__main__': if 'serve' in sys.argv: - uvicorn.run(app=app, host='0.0.0.0', port=5000, log_level="info") + uvicorn.run(app=app, host='0.0.0.0', port=Port, log_level="info") From 8b4f03df54b44585b0bc4a6abbb81651c614cbb2 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 23:10:46 +0530 Subject: [PATCH 10/21] 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 216a54fc3..a7d7ab61b 100644 --- a/app/server.py +++ b/app/server.py @@ -11,7 +11,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://www.dropbox.com/s/azoha55knyin8jg/export.pkl?dl=1' +export_file_url = 'https://drive.google.com/uc?export=download&id=1nAk0uZ35R8g3eiFe5vo8DNtbPGvzcby3' export_file_name = 'export.pkl' Port = int(os.environ.get('PORT', 50000)) From 6d6aa10e369fd27470e1e0d561c764c1b1feed8e Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 23:20:09 +0530 Subject: [PATCH 11/21] 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 a7d7ab61b..216a54fc3 100644 --- a/app/server.py +++ b/app/server.py @@ -11,7 +11,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://drive.google.com/uc?export=download&id=1nAk0uZ35R8g3eiFe5vo8DNtbPGvzcby3' +export_file_url = 'https://www.dropbox.com/s/azoha55knyin8jg/export.pkl?dl=1' export_file_name = 'export.pkl' Port = int(os.environ.get('PORT', 50000)) From f9edfeca155d043be5e89633f6877bb9514c52e2 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 23:25:45 +0530 Subject: [PATCH 12/21] 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 216a54fc3..1ee1a0404 100644 --- a/app/server.py +++ b/app/server.py @@ -11,7 +11,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://www.dropbox.com/s/azoha55knyin8jg/export.pkl?dl=1' +export_file_url = 'https://onedrive.live.com/download?cid=21879B529186CAC3&resid=21879B529186CAC3%21106&authkey=AJw6ap_M8WyIbug' export_file_name = 'export.pkl' Port = int(os.environ.get('PORT', 50000)) From af566a2df64c96cd27730488c13449eacfd5d0a7 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 23:38:30 +0530 Subject: [PATCH 13/21] Update requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 1a7f25c2d..74ed2edf6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,5 @@ pillow~=7.1.0 python-multipart==0.0.5 starlette==0.12.0 uvicorn==0.11.7 +cloudpickle==1.3.0 +pickleshare==0.7.5 From 0488b283da3acf93396bfe1819bab3ea083f6116 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Wed, 12 Aug 2020 23:43:09 +0530 Subject: [PATCH 14/21] Update requirements.txt --- requirements.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 74ed2edf6..1a7f25c2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,3 @@ pillow~=7.1.0 python-multipart==0.0.5 starlette==0.12.0 uvicorn==0.11.7 -cloudpickle==1.3.0 -pickleshare==0.7.5 From 239cc2db5cb5feea562a97cd8dda12cdc3efb2a7 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 09:20:34 +0530 Subject: [PATCH 15/21] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1a7f25c2d..2664b5e2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ aiofiles==0.4.0 aiohttp==3.5.4 asyncio==3.4.3 fastai==1.0.52 -https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torch-1.6.0-cp37-cp37m-linux_x86_64.whl https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl numpy==1.16.3 pillow~=7.1.0 From efc1b90045c47da4f4bf3e5dbfc5712441e1e28b Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 09:28:58 +0530 Subject: [PATCH 16/21] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2664b5e2f..61afc9066 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ aiofiles==0.4.0 aiohttp==3.5.4 asyncio==3.4.3 -fastai==1.0.52 +fastai==1.0.61 https://download.pytorch.org/whl/cpu/torch-1.6.0-cp37-cp37m-linux_x86_64.whl -https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torchvision-0.7.0-cp37-cp37m-linux_x86_64.whl numpy==1.16.3 pillow~=7.1.0 python-multipart==0.0.5 From 214b37dabc95f4cc41d9e115ec053c828a193335 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 09:34:05 +0530 Subject: [PATCH 17/21] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 61afc9066..a93ae15d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ aiofiles==0.4.0 aiohttp==3.5.4 asyncio==3.4.3 fastai==1.0.61 -https://download.pytorch.org/whl/cpu/torch-1.6.0-cp37-cp37m-linux_x86_64.whl -https://download.pytorch.org/whl/cpu/torchvision-0.7.0-cp37-cp37m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl +https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl numpy==1.16.3 pillow~=7.1.0 python-multipart==0.0.5 From e0434d226cdfdd047a8aa734e61d9ec6f26fbc6a Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:12:52 +0530 Subject: [PATCH 18/21] 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 1ee1a0404..0bf7b2d15 100644 --- a/app/server.py +++ b/app/server.py @@ -11,7 +11,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://onedrive.live.com/download?cid=21879B529186CAC3&resid=21879B529186CAC3%21106&authkey=AJw6ap_M8WyIbug' +export_file_url = 'https://www.dropbox.com/s/2w5fwbf51ovz2aj/export.pkl?dl=0' export_file_name = 'export.pkl' Port = int(os.environ.get('PORT', 50000)) From b045ec052f0a1a80e2382b5c6a4979c82f6260f2 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:54:29 +0530 Subject: [PATCH 19/21] 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 0bf7b2d15..fa0278e76 100644 --- a/app/server.py +++ b/app/server.py @@ -11,7 +11,7 @@ from starlette.responses import HTMLResponse, JSONResponse from starlette.staticfiles import StaticFiles -export_file_url = 'https://www.dropbox.com/s/2w5fwbf51ovz2aj/export.pkl?dl=0' +export_file_url = 'https://www.dropbox.com/s/2w5fwbf51ovz2aj/export.pkl?dl=1' export_file_name = 'export.pkl' Port = int(os.environ.get('PORT', 50000)) From 0597f5675de080540229f976c71ab192cdd94564 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 11:11:39 +0530 Subject: [PATCH 20/21] 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 fa0278e76..f41774bfa 100644 --- a/app/server.py +++ b/app/server.py @@ -16,7 +16,7 @@ Port = int(os.environ.get('PORT', 50000)) -classes = ['social_dist', 'no_social_dist'] +classes = ['social dist', 'no social dist'] path = Path(__file__).parent app = Starlette() From 182c0300f405f0efcc1e9ed86f85a194d1f8c084 Mon Sep 17 00:00:00 2001 From: ryuzaki-yagami <69421538+ryuzaki-yagami@users.noreply.github.com> Date: Thu, 13 Aug 2020 22:50:17 +0530 Subject: [PATCH 21/21] Update index.html --- app/view/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/view/index.html b/app/view/index.html index 6642e26f5..66bd6b61f 100644 --- a/app/view/index.html +++ b/app/view/index.html @@ -7,10 +7,9 @@
-
Classify Bear Images 🐻
+
Check if social distancing is being followed or not.

- Use images of teddy bears, black bears, grizzly bears, or - all three! + Use images from drones, CCTV, etc!