sprite33 commited on
Commit
43c0f04
Β·
1 Parent(s): 9f12121
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ ml311
app.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ import pickle
4
+
5
+ # λͺ¨λΈ λ‘œλ”© ν•¨μˆ˜
6
+ def load_model(μ‹œμ„€μœ ν˜•):
7
+ with open(μ‹œμ„€μœ ν˜•+".pkl", "rb") as file:
8
+ loaded_pipeline = pickle.load(file)
9
+ return loaded_pipeline
10
+
11
+ # 예츑 ν•¨μˆ˜ μ •μ˜
12
+ def predict_cost(μ‹œμ„€μœ ν˜•, ꡬ쑰, μ§€ν•˜μΈ΅μˆ˜, μ§€μƒμΈ΅μˆ˜, κΈ°μ€€μΈ΅μΈ΅κ³ , μ΅œκ³ λ†’μ΄, 연면적, λŒ€μ§€λ©΄μ , 건좕면적, 쑰경면적, μ£Όμ°¨λŒ€μˆ˜, λ°œμ£Όλ…„λ„, λ°œμ£Όμ›”, ν˜„μž₯μœ„μΉ˜):
13
+ new_project = {
14
+ 'ꡬ쑰': [ꡬ쑰],
15
+ 'μ§€ν•˜μΈ΅μˆ˜': [μ§€ν•˜μΈ΅μˆ˜],
16
+ 'μ§€μƒμΈ΅μˆ˜': [μ§€μƒμΈ΅μˆ˜],
17
+ 'κΈ°μ€€μΈ΅μΈ΅κ³ ': [κΈ°μ€€μΈ΅μΈ΅κ³ ],
18
+ 'μ΅œκ³ λ†’μ΄': [μ΅œκ³ λ†’μ΄],
19
+ 'μ£Όμ°¨λŒ€μˆ˜': [μ£Όμ°¨λŒ€μˆ˜],
20
+ '연면적': [연면적],
21
+ 'λŒ€μ§€λ©΄μ ': [λŒ€μ§€λ©΄μ ],
22
+ '건좕면적': [건좕면적],
23
+ '쑰경면적': [쑰경면적],
24
+ 'λ°œμ£Όλ…„λ„': [λ°œμ£Όλ…„λ„],
25
+ 'λ°œμ£Όμ›”': [λ°œμ£Όμ›”],
26
+ 'ν˜„μž₯μœ„μΉ˜': [ν˜„μž₯μœ„μΉ˜],
27
+ }
28
+
29
+ model = load_model(μ‹œμ„€μœ ν˜•)
30
+ pred = model.predict(pd.DataFrame.from_dict(new_project))
31
+
32
+ return f'{pred[0]:,.0f}일'
33
+
34
+ with gr.Blocks() as demo:
35
+ gr.Markdown("## HG 곡사기간 예츑 λͺ¨λΈ")
36
+ with gr.Row():
37
+ μ‹œμ„€μœ ν˜• = gr.Dropdown(label="μ‹œμ„€μœ ν˜•", choices=["μΌλ°˜μ²­μ‚¬","μΌλ°˜ν˜•μ΄ˆμ€‘κ³ ","κΈ°νƒ€μ‹œμ„€","λ³΅ν•©ν˜•μ΄ˆμ€‘κ³ ","λŒ€ν˜•μ²­μ‚¬","μΌλ°˜ν˜•μ—°κ΅¬μ†Œ","λ…Έμœ μžμ‹œμ„€","μΌλ°˜ν˜•μ „μ‹œμ‹œμ„€","μ‹€ν—˜μš©μ—°κ΅¬μ‹œμ„€","λ³΅ν•©ν˜•μ²΄μœ‘μ‹œμ„€","λ³΅ν•©ν˜•λŒ€ν•™κ΅","κ°•μ˜ν˜•λŒ€ν•™κ΅","λ³΅μ§€μ‹œμ„€","λ„μ„œκ΄€","μΌλ°˜ν˜•μˆ˜λ ¨μ‹œμ„€","κΈ°μˆ™μ‚¬","λŒ€ν˜•μ˜λ£Œμ‹œμ„€","μΌλ°˜ν˜•κ³΅μž₯","μ²¨λ‹¨μ—°κ΅¬μ‹œμ„€","λ³΅ν•©ν˜•μˆ˜λ ¨μ‹œμ„€","νŠΉμˆ˜ν˜•κ³΅μž₯"],
38
+ value='κ°•μ˜ν˜•λŒ€ν•™κ΅') # '...'뢀뢄에 λ‹€λ₯Έ μ‹œμ„€μœ ν˜• μΆ”κ°€
39
+ ν˜„μž₯μœ„μΉ˜ = gr.Dropdown(label="ν˜„μž₯μœ„μΉ˜", choices=['μ„œμšΈνŠΉλ³„μ‹œ', 'μ œμ£ΌνŠΉλ³„μžμΉ˜λ„', '경상뢁도', 'μšΈμ‚°κ΄‘μ—­μ‹œ', 'κ΄‘μ£Όκ΄‘μ—­μ‹œ', '경기도', '좩청뢁도',
40
+ '경상남도', '전라남도', 'λΆ€μ‚°κ΄‘μ—­μ‹œ', '좩청남도', 'λŒ€κ΅¬κ΄‘μ—­μ‹œ', '강원도', 'μΈμ²œκ΄‘μ—­μ‹œ', '전라뢁도',
41
+ 'μ„Έμ’…νŠΉλ³„μžμΉ˜μ‹œ', 'λŒ€μ „κ΄‘μ—­μ‹œ', 'κ°•μ›νŠΉλ³„μžμΉ˜λ„'], value='κ΄‘μ£Όκ΄‘μ—­μ‹œ')
42
+ ꡬ쑰 = gr.Dropdown(label="ꡬ쑰", choices=['철근콘크리트쑰', '철골쑰', '철골철근콘크리트쑰', '기타'], value='철골철근콘크리트쑰') # '...'뢀뢄에 λ‹€λ₯Έ ꡬ쑰 νƒ€μž… μΆ”κ°€
43
+ with gr.Row():
44
+ μ§€ν•˜μΈ΅μˆ˜ = gr.Number(label="μ§€ν•˜μΈ΅μˆ˜", value=0)
45
+ μ§€μƒμΈ΅μˆ˜ = gr.Number(label="μ§€μƒμΈ΅μˆ˜", value=7)
46
+ κΈ°μ€€μΈ΅μΈ΅κ³  = gr.Number(label="κΈ°μ€€μΈ΅μΈ΅κ³ (m)", value=4.5)
47
+ μ΅œκ³ λ†’μ΄ = gr.Number(label="μ΅œκ³ λ†’μ΄(m)", value=33.9)
48
+ with gr.Row():
49
+ 연면적 = gr.Number(label="연면적(m2)", value=4451)
50
+ λŒ€μ§€λ©΄μ  = gr.Number(label="λŒ€μ§€λ©΄μ (m2)", value=989860)
51
+ 건좕면적 = gr.Number(label="건좕면적(m2)", value=922)
52
+ 쑰경면적 = gr.Number(label="쑰경면적(m2)", value=180)
53
+ with gr.Row():
54
+ 주차수 = gr.Number(label="μ£Όμ°¨λŒ€μˆ˜", value=7)
55
+ λ°œμ£Όλ…„ = gr.Number(label="λ°œμ£Όλ…„λ„", value=2023)
56
+ λ°œμ£Όμ›” = gr.Number(label="λ°œμ£Όμ›”", value=8)
57
+ btn = gr.Button("곡사기간 예츑")
58
+
59
+ btn.click(
60
+ predict_cost,
61
+ inputs=[
62
+ μ‹œμ„€μœ ν˜•, ꡬ쑰, μ§€ν•˜μΈ΅μˆ˜, μ§€μƒμΈ΅μˆ˜, κΈ°μ€€μΈ΅μΈ΅κ³ , μ΅œκ³ λ†’μ΄, 연면적, λŒ€μ§€λ©΄μ , 건좕면적, 쑰경면적, 주차수, λ°œμ£Όλ…„, λ°œμ£Όμ›”, ν˜„μž₯μœ„μΉ˜
63
+ ],
64
+ outputs=[
65
+ gr.Textbox(label="곡사기간")
66
+ ]
67
+ )
68
+
69
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ pandas
2
+ scikit-learn==1.3.2
3
+ gradio
κ°•μ˜ν˜•λŒ€ν•™κ΅.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9342651388cfd431b156606a594d3d952c404dba7b3c659ecdcc058dfae7b9ff
3
+ size 137788
κΈ°μˆ™μ‚¬.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9fe3cb72c6bb901a74221292df697a0efaffd2dd6052293fec5f141fdda3f437
3
+ size 102405
κΈ°νƒ€μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d86f79a8bddcc35119414f4b350c86db7a52869bae5fa7b00d0ab6b6aff4928
3
+ size 536593
λ…Έμœ μžμ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bb06c478fe2ea07d873cbed9815c5a27f1756a1a698e7bd073b7e295a2137c7
3
+ size 290345
λŒ€ν˜•μ˜λ£Œμ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6dfa88a88cddd5a1b95889ea46831737f1d410908771d9edf479b68af181058
3
+ size 109325
λŒ€ν˜•μ²­μ‚¬.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02f5f3f44a04b2eb937e386c6f7e54f5d04c0dc36d982b9c482c73903a75cf9d
3
+ size 437507
λ„μ„œκ΄€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6908e38baee38075adb43e7395d74980fef001206a5c4c8c347a4c39fe6886ef
3
+ size 139106
λ³΅μ§€μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8909236cb7764c418aea4665d10b9708af079092337c5435404027a5e6dce925
3
+ size 133060
λ³΅ν•©ν˜•λŒ€ν•™κ΅.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ff41b4010abefd7ecb1e752c4dcc865274dd41174025c4da2eb260278f2af5c
3
+ size 203353
λ³΅ν•©ν˜•μˆ˜λ ¨μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e1377c46068af45e40363125b2078707a92e0932d5211801f1a284f6ebd7d67
3
+ size 78586
λ³΅ν•©ν˜•μ²΄μœ‘μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d577ce6f8d13bb1b5a42f19692075fdd7ac3290e59c8615a56765a91dafa264b
3
+ size 267125
λ³΅ν•©ν˜•μ΄ˆμ€‘κ³ .pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cb3b6c4461f1a899a23681d84214bb12c61356ad5c047f9dbfcdfa2acee251f
3
+ size 453911
μ‹€ν—˜μš©μ—°κ΅¬μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dfc3813b0d629855d26f2b6709f0f3f5554375f25d5878e29a93ff22e90a00f
3
+ size 247220
μΌλ°˜μ²­μ‚¬.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca1074d8cb3b326547fbb5b76513ab675a3d08a0f02ca00d68fe6673d09ec6a4
3
+ size 908088
μΌλ°˜ν˜•κ³΅μž₯.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:042c1f86a3a800138d1b530217619314acc7722074c9019bdf093ede1f508709
3
+ size 108121
μΌλ°˜ν˜•μˆ˜λ ¨μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9dba10274bcbdfbd0dc6b996b7ff3ccdf4c5c48100ce3f46be157da6663f277
3
+ size 129635
μΌλ°˜ν˜•μ—°κ΅¬μ†Œ.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e4a5251e5c28738aafd56e7fa3f4f8ba1c6ac7db8d0fd6df584685970d8b68d
3
+ size 280598
μΌλ°˜ν˜•μ „μ‹œμ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca684d1dec0f04d2af916915e231755ea2f7df164512641c4e9b174699705cb7
3
+ size 287585
μΌλ°˜ν˜•μ΄ˆμ€‘κ³ .pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86606debefa1388e383e253d51064783367573714790cfe4ee814930c3088324
3
+ size 668721
μ²¨λ‹¨μ—°κ΅¬μ‹œμ„€.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32bef415158d58d914d6f9a63e63f8fc68fe7ab3e10809c96ecdd65acf8c554e
3
+ size 107944
νŠΉμˆ˜ν˜•κ³΅μž₯.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a089ad4dd83372c2862ea4dc81663a10bc70df11ad267f31bb876eae694e6e91
3
+ size 90602