Skip to content

Commit

Permalink
Feat(#1) : ColabCode 사용 해봄
Browse files Browse the repository at this point in the history
  • Loading branch information
LEEHYUNBOK committed Jun 14, 2023
1 parent f972448 commit 47a6d0b
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 4 deletions.
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import torch
import os
from fastapi.middleware.cors import CORSMiddleware

from colabcode import ColabCode
from loguru import logger
from testingColabCode import test

cc = ColabCode(port=8000, code=False)

model = torch.load('shufflenet_weight.pt', map_location=torch.device('cpu'))

Expand Down Expand Up @@ -62,9 +64,12 @@ class Model(BaseModel):

@app.get("/")
def 이름():
test()
return '보낼 값'

@app.post("/send")
def data받기(data : Model):
print(data)
return '전송완료'
return '전송완료'

cc.run_app(app=app)
67 changes: 65 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,106 @@
anyio==3.7.0
appnope==0.1.3
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.2.1
attrs==23.1.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
certifi==2023.5.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
click==7.1.2
colabcode==0.3.0
colorama==0.4.6
comm==0.1.3
contourpy==1.0.7
cycler==0.11.0
debugpy==1.6.7
decorator==5.1.1
defusedxml==0.7.1
executing==1.2.0
fastapi==0.96.0
fastjsonschema==2.17.1
filelock==3.12.0
fonttools==4.39.4
h11==0.14.0
httptools==0.5.0
idna==3.4
ipykernel==6.23.2
ipython==8.14.0
ipython-genutils==0.2.0
jedi==0.18.2
Jinja2==3.1.2
json5==0.9.14
jsonschema==4.17.3
jupyter-server==1.24.0
jupyter_client==8.2.0
jupyter_core==5.3.0
jupyterlab==3.0.7
jupyterlab-pygments==0.2.2
jupyterlab_server==2.23.0
kiwisolver==1.4.4
loguru==0.7.0
MarkupSafe==2.1.3
matplotlib==3.7.1
matplotlib-inline==0.1.6
mistune==2.0.5
mpmath==1.3.0
nbclassic==0.3.7
nbclient==0.8.0
nbconvert==7.5.0
nbformat==5.9.0
nest-asyncio==1.4.3
networkx==3.1
notebook==6.4.5
notebook_shim==0.2.3
numpy==1.24.3
packaging==23.1
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.5.0
platformdirs==3.5.3
prometheus-client==0.17.0
prompt-toolkit==3.0.38
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pydantic==1.10.8
Pygments==2.15.1
pyngrok==6.0.0
pyparsing==3.0.9
pyrsistent==0.19.3
python-dateutil==2.8.2
python-dotenv==1.0.0
python-multipart==0.0.6
PyYAML==6.0
pyzmq==25.1.0
requests==2.31.0
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
stack-data==0.6.2
starlette==0.27.0
sympy==1.12
terminado==0.17.1
tinycss2==1.2.1
torch==2.0.1
torchvision==0.15.2
tornado==6.3.2
tqdm==4.65.0
traitlets==5.9.0
typing_extensions==4.6.3
urllib3==2.0.2
uvicorn==0.22.0
uvicorn==0.13.1
watchfiles==0.19.0
wcwidth==0.2.6
webencodings==0.5.1
websocket-client==1.5.3
websockets==11.0.3
win32-setctime==1.1.0
3 changes: 3 additions & 0 deletions testingColabCode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def test():
for i in range(10):
print(i)

0 comments on commit 47a6d0b

Please sign in to comment.