Skip to content

Commit 47a6d0b

Browse files
committed
Feat(#1) : ColabCode 사용 해봄
1 parent f972448 commit 47a6d0b

File tree

3 files changed

+75
-4
lines changed

3 files changed

+75
-4
lines changed

main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
import torch
66
import os
77
from fastapi.middleware.cors import CORSMiddleware
8-
8+
from colabcode import ColabCode
99
from loguru import logger
10+
from testingColabCode import test
1011

12+
cc = ColabCode(port=8000, code=False)
1113

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

@@ -62,9 +64,12 @@ class Model(BaseModel):
6264

6365
@app.get("/")
6466
def 이름():
67+
test()
6568
return '보낼 값'
6669

6770
@app.post("/send")
6871
def data받기(data : Model):
6972
print(data)
70-
return '전송완료'
73+
return '전송완료'
74+
75+
cc.run_app(app=app)

requirements.txt

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,106 @@
11
anyio==3.7.0
2+
appnope==0.1.3
3+
argon2-cffi==21.3.0
4+
argon2-cffi-bindings==21.2.0
5+
asttokens==2.2.1
6+
attrs==23.1.0
7+
Babel==2.12.1
8+
backcall==0.2.0
9+
beautifulsoup4==4.12.2
10+
bleach==6.0.0
211
certifi==2023.5.7
12+
cffi==1.15.1
313
charset-normalizer==3.1.0
4-
click==8.1.3
14+
click==7.1.2
15+
colabcode==0.3.0
516
colorama==0.4.6
17+
comm==0.1.3
618
contourpy==1.0.7
719
cycler==0.11.0
20+
debugpy==1.6.7
21+
decorator==5.1.1
22+
defusedxml==0.7.1
23+
executing==1.2.0
824
fastapi==0.96.0
25+
fastjsonschema==2.17.1
926
filelock==3.12.0
1027
fonttools==4.39.4
1128
h11==0.14.0
1229
httptools==0.5.0
1330
idna==3.4
31+
ipykernel==6.23.2
32+
ipython==8.14.0
33+
ipython-genutils==0.2.0
34+
jedi==0.18.2
1435
Jinja2==3.1.2
36+
json5==0.9.14
37+
jsonschema==4.17.3
38+
jupyter-server==1.24.0
39+
jupyter_client==8.2.0
40+
jupyter_core==5.3.0
41+
jupyterlab==3.0.7
42+
jupyterlab-pygments==0.2.2
43+
jupyterlab_server==2.23.0
1544
kiwisolver==1.4.4
1645
loguru==0.7.0
1746
MarkupSafe==2.1.3
1847
matplotlib==3.7.1
48+
matplotlib-inline==0.1.6
49+
mistune==2.0.5
1950
mpmath==1.3.0
51+
nbclassic==0.3.7
52+
nbclient==0.8.0
53+
nbconvert==7.5.0
54+
nbformat==5.9.0
55+
nest-asyncio==1.4.3
2056
networkx==3.1
57+
notebook==6.4.5
58+
notebook_shim==0.2.3
2159
numpy==1.24.3
2260
packaging==23.1
61+
pandocfilters==1.5.0
62+
parso==0.8.3
63+
pexpect==4.8.0
64+
pickleshare==0.7.5
2365
Pillow==9.5.0
66+
platformdirs==3.5.3
67+
prometheus-client==0.17.0
68+
prompt-toolkit==3.0.38
69+
psutil==5.9.5
70+
ptyprocess==0.7.0
71+
pure-eval==0.2.2
72+
pycparser==2.21
2473
pydantic==1.10.8
74+
Pygments==2.15.1
75+
pyngrok==6.0.0
2576
pyparsing==3.0.9
77+
pyrsistent==0.19.3
2678
python-dateutil==2.8.2
2779
python-dotenv==1.0.0
2880
python-multipart==0.0.6
2981
PyYAML==6.0
82+
pyzmq==25.1.0
3083
requests==2.31.0
84+
Send2Trash==1.8.2
3185
six==1.16.0
3286
sniffio==1.3.0
87+
soupsieve==2.4.1
88+
stack-data==0.6.2
3389
starlette==0.27.0
3490
sympy==1.12
91+
terminado==0.17.1
92+
tinycss2==1.2.1
3593
torch==2.0.1
3694
torchvision==0.15.2
95+
tornado==6.3.2
3796
tqdm==4.65.0
97+
traitlets==5.9.0
3898
typing_extensions==4.6.3
3999
urllib3==2.0.2
40-
uvicorn==0.22.0
100+
uvicorn==0.13.1
41101
watchfiles==0.19.0
102+
wcwidth==0.2.6
103+
webencodings==0.5.1
104+
websocket-client==1.5.3
42105
websockets==11.0.3
43106
win32-setctime==1.1.0

testingColabCode.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def test():
2+
for i in range(10):
3+
print(i)

0 commit comments

Comments
 (0)