File tree 3 files changed +75
-4
lines changed
3 files changed +75
-4
lines changed Original file line number Diff line number Diff line change 5
5
import torch
6
6
import os
7
7
from fastapi .middleware .cors import CORSMiddleware
8
-
8
+ from colabcode import ColabCode
9
9
from loguru import logger
10
+ from testingColabCode import test
10
11
12
+ cc = ColabCode (port = 8000 , code = False )
11
13
12
14
model = torch .load ('shufflenet_weight.pt' , map_location = torch .device ('cpu' ))
13
15
@@ -62,9 +64,12 @@ class Model(BaseModel):
62
64
63
65
@app .get ("/" )
64
66
def 이름 ():
67
+ test ()
65
68
return '보낼 값'
66
69
67
70
@app .post ("/send" )
68
71
def data받기 (data : Model ):
69
72
print (data )
70
- return '전송완료'
73
+ return '전송완료'
74
+
75
+ cc .run_app (app = app )
Original file line number Diff line number Diff line change 1
1
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
2
11
certifi == 2023.5.7
12
+ cffi == 1.15.1
3
13
charset-normalizer == 3.1.0
4
- click == 8.1.3
14
+ click == 7.1.2
15
+ colabcode == 0.3.0
5
16
colorama == 0.4.6
17
+ comm == 0.1.3
6
18
contourpy == 1.0.7
7
19
cycler == 0.11.0
20
+ debugpy == 1.6.7
21
+ decorator == 5.1.1
22
+ defusedxml == 0.7.1
23
+ executing == 1.2.0
8
24
fastapi == 0.96.0
25
+ fastjsonschema == 2.17.1
9
26
filelock == 3.12.0
10
27
fonttools == 4.39.4
11
28
h11 == 0.14.0
12
29
httptools == 0.5.0
13
30
idna == 3.4
31
+ ipykernel == 6.23.2
32
+ ipython == 8.14.0
33
+ ipython-genutils == 0.2.0
34
+ jedi == 0.18.2
14
35
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
15
44
kiwisolver == 1.4.4
16
45
loguru == 0.7.0
17
46
MarkupSafe == 2.1.3
18
47
matplotlib == 3.7.1
48
+ matplotlib-inline == 0.1.6
49
+ mistune == 2.0.5
19
50
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
20
56
networkx == 3.1
57
+ notebook == 6.4.5
58
+ notebook_shim == 0.2.3
21
59
numpy == 1.24.3
22
60
packaging == 23.1
61
+ pandocfilters == 1.5.0
62
+ parso == 0.8.3
63
+ pexpect == 4.8.0
64
+ pickleshare == 0.7.5
23
65
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
24
73
pydantic == 1.10.8
74
+ Pygments == 2.15.1
75
+ pyngrok == 6.0.0
25
76
pyparsing == 3.0.9
77
+ pyrsistent == 0.19.3
26
78
python-dateutil == 2.8.2
27
79
python-dotenv == 1.0.0
28
80
python-multipart == 0.0.6
29
81
PyYAML == 6.0
82
+ pyzmq == 25.1.0
30
83
requests == 2.31.0
84
+ Send2Trash == 1.8.2
31
85
six == 1.16.0
32
86
sniffio == 1.3.0
87
+ soupsieve == 2.4.1
88
+ stack-data == 0.6.2
33
89
starlette == 0.27.0
34
90
sympy == 1.12
91
+ terminado == 0.17.1
92
+ tinycss2 == 1.2.1
35
93
torch == 2.0.1
36
94
torchvision == 0.15.2
95
+ tornado == 6.3.2
37
96
tqdm == 4.65.0
97
+ traitlets == 5.9.0
38
98
typing_extensions == 4.6.3
39
99
urllib3 == 2.0.2
40
- uvicorn == 0.22.0
100
+ uvicorn == 0.13.1
41
101
watchfiles == 0.19.0
102
+ wcwidth == 0.2.6
103
+ webencodings == 0.5.1
104
+ websocket-client == 1.5.3
42
105
websockets == 11.0.3
43
106
win32-setctime == 1.1.0
Original file line number Diff line number Diff line change
1
+ def test ():
2
+ for i in range (10 ):
3
+ print (i )
You can’t perform that action at this time.
0 commit comments