Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,6 @@ def call_api(content, system_message, max_tokens, temperature, top_p):
|
|
| 32 |
# 1) ์ ๋ก์ฌํญ/๋ชฉํ ๋ถ์
|
| 33 |
######################
|
| 34 |
def analyze_texts(difficulties, goals):
|
| 35 |
-
# ์ ๋ก์ฌํญ
|
| 36 |
preview_difficulties = call_api(
|
| 37 |
content=difficulties,
|
| 38 |
system_message=(
|
|
@@ -44,7 +43,6 @@ def analyze_texts(difficulties, goals):
|
|
| 44 |
temperature=0.7,
|
| 45 |
top_p=0.9,
|
| 46 |
)
|
| 47 |
-
# ์ปจ์คํ
๋ชฉํ
|
| 48 |
preview_goals = call_api(
|
| 49 |
content=goals,
|
| 50 |
system_message=(
|
|
@@ -59,13 +57,9 @@ def analyze_texts(difficulties, goals):
|
|
| 59 |
return preview_difficulties, preview_goals
|
| 60 |
|
| 61 |
######################
|
| 62 |
-
# 2) SWOT ๋ถ์(4์นธ)
|
| 63 |
######################
|
| 64 |
def analyze_swot(strengths, weaknesses, opportunities, threats):
|
| 65 |
-
"""
|
| 66 |
-
๊ฐ์ , ์ฝ์ , ๊ธฐํ, ์ํ์ ๊ฐ๊ฐ ์์ฝ.
|
| 67 |
-
์ต์ข
์ '๊ฐ์ :', '์ฝ์ :', '๊ธฐํ:', '์ํ:' ๋ค ์ค๋ก ์๋ต.
|
| 68 |
-
"""
|
| 69 |
system_message = (
|
| 70 |
"๋น์ ์ swot ๋ถ์ ์ ๋ฌธ๊ฐ์
๋๋ค. "
|
| 71 |
"์
๋ ฅ๋ ๊ฐ์ , ์ฝ์ , ๊ธฐํ, ์ํ์ ๊ฐ๊ฐ ์์ฝํด ์ฃผ์ธ์. "
|
|
@@ -85,13 +79,13 @@ def analyze_swot(strengths, weaknesses, opportunities, threats):
|
|
| 85 |
return call_api(
|
| 86 |
content=content,
|
| 87 |
system_message=system_message,
|
| 88 |
-
max_tokens=
|
| 89 |
temperature=0.7,
|
| 90 |
top_p=1.0
|
| 91 |
)
|
| 92 |
|
| 93 |
######################
|
| 94 |
-
# 3) ์ฌ๋ฌด ๋ถ์
|
| 95 |
######################
|
| 96 |
def analyze_financials(
|
| 97 |
avg_monthly_sales,
|
|
@@ -103,54 +97,38 @@ def analyze_financials(
|
|
| 103 |
other_cost,
|
| 104 |
cost_ratio
|
| 105 |
):
|
| 106 |
-
"""
|
| 107 |
-
์ฌ์ฉ์ ์
๋ ฅ 8๊ฐ(์ํ๊ท ๋งค์ถ์ก, ์์ฐจ๋ฃ, ์ธ๊ฑด๋น, ๊ด๋ฆฌ๋น, ์๋๊ด์ด๋น, ์ง๊ธ์ด์, ๊ธฐํ๋น์ฉ, ์๊ฐ์จ)๋ฅผ
|
| 108 |
-
๊ทธ๋๋ก ํ์ํด์ฃผ๊ณ , ์ถ๊ฐ๋ก
|
| 109 |
-
(๊ฐ๊ฐ์๊ฐ๋น, ์์ด์ต์จ, ์์์์ต, ์์ต๋ถ๊ธฐ์ ) 4๊ฐ๋ฅผ ๊ณ์ฐ/์ถ์ ํ์ฌ ํฉ์ณ ์ด 12์ค๋ก
|
| 110 |
-
'ํญ๋ชฉ๋ช
: ์์น' ํํ๋ก๋ง ์ถ๋ ฅํ๋ ํจ์.
|
| 111 |
-
"""
|
| 112 |
system_message = (
|
| 113 |
-
"๋น์ ์ ์ธ๋ฌด์ฌ(ํ๊ณ์ฌ)์
๋๋ค. ์๋ ์
๋ ฅ๊ฐ์
|
| 114 |
-
"
|
| 115 |
-
"
|
| 116 |
-
"์ด 12์ค, ๊ฐ ์ค์ ํญ๋ชฉ๋ช
: ๊ฐ ๋ง. "
|
| 117 |
-
"์ถ๊ฐ ์ค๋ช
์ด๋ ๋ฌธ์ฅ์ ๋ฃ์ง ๋ง์์ฃผ์ธ์."
|
| 118 |
)
|
| 119 |
content = f"""
|
| 120 |
์
๋ ฅ:
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
๊ฒฐ๊ณผ ํญ๋ชฉ
|
| 131 |
-
1)
|
| 132 |
-
2)
|
| 133 |
-
3)
|
| 134 |
-
4)
|
| 135 |
-
5) ์๋๊ด์ด๋น
|
| 136 |
-
6) ์ง๊ธ์ด์
|
| 137 |
-
7) ๊ธฐํ๋น์ฉ
|
| 138 |
-
8) ์๊ฐ์จ
|
| 139 |
-
9) ๊ฐ๊ฐ์๊ฐ๋น
|
| 140 |
-
10) ์์ด์ต์จ
|
| 141 |
-
11) ์์์์ต
|
| 142 |
-
12) ์์ต๋ถ๊ธฐ์
|
| 143 |
"""
|
| 144 |
return call_api(
|
| 145 |
content=content,
|
| 146 |
system_message=system_message,
|
| 147 |
-
max_tokens=
|
| 148 |
temperature=0.7,
|
| 149 |
top_p=1.0
|
| 150 |
)
|
| 151 |
|
| 152 |
######################
|
| 153 |
-
# 4) ์๊ถ ๋ถ์(1์ค)
|
| 154 |
######################
|
| 155 |
def analyze_market(region, industry):
|
| 156 |
system_message = (
|
|
@@ -170,7 +148,7 @@ def analyze_market(region, industry):
|
|
| 170 |
)
|
| 171 |
|
| 172 |
######################
|
| 173 |
-
#
|
| 174 |
######################
|
| 175 |
def run_all_in_one(
|
| 176 |
# (A) ์๋จ 8๊ฐ
|
|
@@ -193,7 +171,7 @@ def run_all_in_one(
|
|
| 193 |
opportunities_input,
|
| 194 |
threats_input,
|
| 195 |
|
| 196 |
-
# (D) ์ฌ๋ฌด๋ถ์ (
|
| 197 |
avg_monthly_sales,
|
| 198 |
rent,
|
| 199 |
labor_cost,
|
|
@@ -207,41 +185,42 @@ def run_all_in_one(
|
|
| 207 |
region_input,
|
| 208 |
industry_input,
|
| 209 |
|
| 210 |
-
# (F) ์ฌ์ง
|
| 211 |
photo1,
|
| 212 |
photo2
|
| 213 |
):
|
| 214 |
"""
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
|
|
|
| 221 |
"""
|
| 222 |
|
| 223 |
-
# 1) ์ ๋ก์ฌํญ/๋ชฉํ
|
| 224 |
preview_difficulties, preview_goals = analyze_texts(difficulties_input, goals_input)
|
| 225 |
|
| 226 |
-
# 2) SWOT
|
| 227 |
swot_result = analyze_swot(strengths_input, weaknesses_input, opportunities_input, threats_input)
|
| 228 |
swot_lines = swot_result.split("\n")
|
| 229 |
-
strength_line = next((
|
| 230 |
-
weakness_line = next((
|
| 231 |
-
opportunity_line = next((
|
| 232 |
-
threat_line = next((
|
| 233 |
|
| 234 |
-
# 3) ์ฌ๋ฌด
|
| 235 |
fin_result = analyze_financials(
|
| 236 |
avg_monthly_sales, rent, labor_cost, management_cost,
|
| 237 |
utilities, current_interest, other_cost, cost_ratio
|
| 238 |
)
|
| 239 |
-
|
| 240 |
|
| 241 |
-
# 4) ์๊ถ
|
| 242 |
market_result = analyze_market(region_input, industry_input)
|
| 243 |
|
| 244 |
-
# ์ด
|
| 245 |
wb = load_workbook("EXE.xlsx")
|
| 246 |
ws = wb.active
|
| 247 |
|
|
@@ -278,20 +257,22 @@ def run_all_in_one(
|
|
| 278 |
ws["G7"] = consulting_region
|
| 279 |
ws["G7"].alignment = Alignment(horizontal="center", vertical="center")
|
| 280 |
|
| 281 |
-
# (B) ์ ๋ก์ฌํญ
|
| 282 |
ws["D11"] = preview_difficulties
|
| 283 |
ws["D11"].alignment = Alignment(wrap_text=True)
|
|
|
|
| 284 |
ws["D22"] = preview_goals
|
| 285 |
-
|
|
|
|
| 286 |
|
| 287 |
-
# (F) ์ฌ์ง(
|
| 288 |
if photo1 is not None:
|
| 289 |
img1_bytes = BytesIO()
|
| 290 |
photo1.save(img1_bytes, format="PNG")
|
| 291 |
img1_bytes.seek(0)
|
| 292 |
img_for_excel_1 = ExcelImage(img1_bytes)
|
| 293 |
-
img_for_excel_1.width = int(37.79 *
|
| 294 |
-
img_for_excel_1.height = int(37.79 * 5)
|
| 295 |
ws.add_image(img_for_excel_1, "B117")
|
| 296 |
|
| 297 |
if photo2 is not None:
|
|
@@ -299,11 +280,11 @@ def run_all_in_one(
|
|
| 299 |
photo2.save(img2_bytes, format="PNG")
|
| 300 |
img2_bytes.seek(0)
|
| 301 |
img_for_excel_2 = ExcelImage(img2_bytes)
|
| 302 |
-
img_for_excel_2.width = int(37.79 *
|
| 303 |
-
img_for_excel_2.height = int(37.79 * 5)
|
| 304 |
ws.add_image(img_for_excel_2, "F117")
|
| 305 |
|
| 306 |
-
# (C) SWOT ๊ฒฐ๊ณผ
|
| 307 |
ws.merge_cells("D45:H45")
|
| 308 |
ws["D45"] = strength_line
|
| 309 |
ws["D45"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
|
@@ -320,29 +301,24 @@ def run_all_in_one(
|
|
| 320 |
ws["D72"] = threat_line
|
| 321 |
ws["D72"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 322 |
|
| 323 |
-
# (D) ์ฌ๋ฌด
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
# ์ ๋ ฌ
|
| 342 |
-
for c_ in ["E", "F", "G"]:
|
| 343 |
-
ws[f"{c_}{row_idx}"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 344 |
-
|
| 345 |
-
# (E) ์๊ถ๋ถ์(D101:H101)
|
| 346 |
ws.merge_cells("D101:H101")
|
| 347 |
ws["D101"] = market_result
|
| 348 |
ws["D101"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
|
@@ -390,7 +366,7 @@ def main():
|
|
| 390 |
|
| 391 |
gr.Markdown("---")
|
| 392 |
|
| 393 |
-
# (C) SWOT
|
| 394 |
strengths_input = gr.Textbox(label="๊ฐ์ ")
|
| 395 |
weaknesses_input = gr.Textbox(label="์ฝ์ ")
|
| 396 |
opportunities_input = gr.Textbox(label="๊ธฐํ")
|
|
@@ -398,7 +374,7 @@ def main():
|
|
| 398 |
|
| 399 |
gr.Markdown("---")
|
| 400 |
|
| 401 |
-
# (D) ์ฌ๋ฌด
|
| 402 |
with gr.Row():
|
| 403 |
avg_monthly_sales_input = gr.Textbox(label="์ํ๊ท ๋งค์ถ์ก")
|
| 404 |
rent_input = gr.Textbox(label="์์ฐจ๋ฃ")
|
|
@@ -419,7 +395,7 @@ def main():
|
|
| 419 |
|
| 420 |
gr.Markdown("---")
|
| 421 |
|
| 422 |
-
# (F) ์ฌ์ง
|
| 423 |
with gr.Row():
|
| 424 |
photo_input_1 = gr.Image(label="์์ง์
์ฒด์ฌ์ง1", type="pil")
|
| 425 |
photo_input_2 = gr.Image(label="์์ง์
์ฒด์ฌ์ง2", type="pil")
|
|
@@ -447,13 +423,13 @@ def main():
|
|
| 447 |
difficulties_input,
|
| 448 |
goals_input,
|
| 449 |
|
| 450 |
-
# (C)
|
| 451 |
strengths_input,
|
| 452 |
weaknesses_input,
|
| 453 |
opportunities_input,
|
| 454 |
threats_input,
|
| 455 |
|
| 456 |
-
# (D)
|
| 457 |
avg_monthly_sales_input,
|
| 458 |
rent_input,
|
| 459 |
labor_cost_input,
|
|
|
|
| 32 |
# 1) ์ ๋ก์ฌํญ/๋ชฉํ ๋ถ์
|
| 33 |
######################
|
| 34 |
def analyze_texts(difficulties, goals):
|
|
|
|
| 35 |
preview_difficulties = call_api(
|
| 36 |
content=difficulties,
|
| 37 |
system_message=(
|
|
|
|
| 43 |
temperature=0.7,
|
| 44 |
top_p=0.9,
|
| 45 |
)
|
|
|
|
| 46 |
preview_goals = call_api(
|
| 47 |
content=goals,
|
| 48 |
system_message=(
|
|
|
|
| 57 |
return preview_difficulties, preview_goals
|
| 58 |
|
| 59 |
######################
|
| 60 |
+
# 2) SWOT ๋ถ์ (4์นธ)
|
| 61 |
######################
|
| 62 |
def analyze_swot(strengths, weaknesses, opportunities, threats):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
system_message = (
|
| 64 |
"๋น์ ์ swot ๋ถ์ ์ ๋ฌธ๊ฐ์
๋๋ค. "
|
| 65 |
"์
๋ ฅ๋ ๊ฐ์ , ์ฝ์ , ๊ธฐํ, ์ํ์ ๊ฐ๊ฐ ์์ฝํด ์ฃผ์ธ์. "
|
|
|
|
| 79 |
return call_api(
|
| 80 |
content=content,
|
| 81 |
system_message=system_message,
|
| 82 |
+
max_tokens=500,
|
| 83 |
temperature=0.7,
|
| 84 |
top_p=1.0
|
| 85 |
)
|
| 86 |
|
| 87 |
######################
|
| 88 |
+
# 3) ์ฌ๋ฌด ๋ถ์ (4์ค)
|
| 89 |
######################
|
| 90 |
def analyze_financials(
|
| 91 |
avg_monthly_sales,
|
|
|
|
| 97 |
other_cost,
|
| 98 |
cost_ratio
|
| 99 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
system_message = (
|
| 101 |
+
"๋น์ ์ ์ธ๋ฌด์ฌ(ํ๊ณ์ฌ)์
๋๋ค. ์๋ ์
๋ ฅ๊ฐ์ ๋ฐํ์ผ๋ก ๊ณ์ฐํ ๊ฐ๊ฐ์๊ฐ๋น, ์์ด์ต์จ, "
|
| 102 |
+
"์์์์ต, ์์ต๋ถ๊ธฐ์ ์ '์ ๋ชฉ: ์์น' ํํ๋ก๋ง ์๋ ค์ฃผ์ธ์. "
|
| 103 |
+
"์ถ๊ฐ ์ค๋ช
์์ด ํญ๋ชฉ๋ช
: ๊ฐ ํํ๋ง."
|
|
|
|
|
|
|
| 104 |
)
|
| 105 |
content = f"""
|
| 106 |
์
๋ ฅ:
|
| 107 |
+
- ์ํ๊ท ๋งค์ถ์ก: {avg_monthly_sales}
|
| 108 |
+
- ์์ฐจ๋ฃ: {rent}
|
| 109 |
+
- ์ธ๊ฑด๋น: {labor_cost}
|
| 110 |
+
- ๊ด๋ฆฌ๋น: {management_cost}
|
| 111 |
+
- ์๋๊ด์ด๋น: {utilities}
|
| 112 |
+
- ์ง๊ธ์ด์: {current_interest}
|
| 113 |
+
- ๊ธฐํ๋น์ฉ: {other_cost}
|
| 114 |
+
- ์๊ฐ์จ: {cost_ratio}
|
| 115 |
+
|
| 116 |
+
๊ฒฐ๊ณผ ํญ๋ชฉ:
|
| 117 |
+
1) ๊ฐ๊ฐ์๊ฐ๋น
|
| 118 |
+
2) ์์ด์ต์จ
|
| 119 |
+
3) ์์์์ต
|
| 120 |
+
4) ์์ต๋ถ๊ธฐ์
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
"""
|
| 122 |
return call_api(
|
| 123 |
content=content,
|
| 124 |
system_message=system_message,
|
| 125 |
+
max_tokens=500,
|
| 126 |
temperature=0.7,
|
| 127 |
top_p=1.0
|
| 128 |
)
|
| 129 |
|
| 130 |
######################
|
| 131 |
+
# 4) ์๊ถ ๋ถ์ (1์ค)
|
| 132 |
######################
|
| 133 |
def analyze_market(region, industry):
|
| 134 |
system_message = (
|
|
|
|
| 148 |
)
|
| 149 |
|
| 150 |
######################
|
| 151 |
+
# ์ต์ข
: ํ ๋ฒ์ EXE.xlsx ์์ฑ
|
| 152 |
######################
|
| 153 |
def run_all_in_one(
|
| 154 |
# (A) ์๋จ 8๊ฐ
|
|
|
|
| 171 |
opportunities_input,
|
| 172 |
threats_input,
|
| 173 |
|
| 174 |
+
# (D) ์ฌ๋ฌด๋ถ์ (4์ค)
|
| 175 |
avg_monthly_sales,
|
| 176 |
rent,
|
| 177 |
labor_cost,
|
|
|
|
| 185 |
region_input,
|
| 186 |
industry_input,
|
| 187 |
|
| 188 |
+
# (F) ์ฌ์ง
|
| 189 |
photo1,
|
| 190 |
photo2
|
| 191 |
):
|
| 192 |
"""
|
| 193 |
+
=> ๋ฌธ์ ์๋จ 8๊ฐ: C4~E7, G4~H7
|
| 194 |
+
=> ์ ๋ก์ฌํญ/๋ชฉํ: D11, D22
|
| 195 |
+
=> SWOT(4์ค): D45, D54, D63, D72
|
| 196 |
+
=> ์ฌ๋ฌด(4์ค): E87..E90
|
| 197 |
+
=> ์๊ถ(1์ค): D101
|
| 198 |
+
=> ์ฌ์ง(๊ฐ๋ก/์ธ๋ก๋ ์ํ๋ ๋๋ก)
|
| 199 |
+
=> '์ปจ์คํ
๋ชฉํ' ์
(D22)๋ง ์์๋ ๊ฐ์ด๋ฐ ์ ๋ ฌ
|
| 200 |
"""
|
| 201 |
|
| 202 |
+
########## 1) GPT(์ ๋ก์ฌํญ/๋ชฉํ)
|
| 203 |
preview_difficulties, preview_goals = analyze_texts(difficulties_input, goals_input)
|
| 204 |
|
| 205 |
+
########## 2) GPT(SWOT)
|
| 206 |
swot_result = analyze_swot(strengths_input, weaknesses_input, opportunities_input, threats_input)
|
| 207 |
swot_lines = swot_result.split("\n")
|
| 208 |
+
strength_line = next((line for line in swot_lines if line.startswith("๊ฐ์ :")), "")
|
| 209 |
+
weakness_line = next((line for line in swot_lines if line.startswith("์ฝ์ :")), "")
|
| 210 |
+
opportunity_line = next((line for line in swot_lines if line.startswith("๊ธฐํ:")), "")
|
| 211 |
+
threat_line = next((line for line in swot_lines if line.startswith("์ํ:")), "")
|
| 212 |
|
| 213 |
+
########## 3) GPT(์ฌ๋ฌด)
|
| 214 |
fin_result = analyze_financials(
|
| 215 |
avg_monthly_sales, rent, labor_cost, management_cost,
|
| 216 |
utilities, current_interest, other_cost, cost_ratio
|
| 217 |
)
|
| 218 |
+
lines = fin_result.split("\n")
|
| 219 |
|
| 220 |
+
########## 4) GPT(์๊ถ)
|
| 221 |
market_result = analyze_market(region_input, industry_input)
|
| 222 |
|
| 223 |
+
########## ์ด ์๋๋ EXE.xlsx ๊ธฐ๋ก
|
| 224 |
wb = load_workbook("EXE.xlsx")
|
| 225 |
ws = wb.active
|
| 226 |
|
|
|
|
| 257 |
ws["G7"] = consulting_region
|
| 258 |
ws["G7"].alignment = Alignment(horizontal="center", vertical="center")
|
| 259 |
|
| 260 |
+
# (B) ์ ๋ก์ฌํญ/๋ชฉํ
|
| 261 |
ws["D11"] = preview_difficulties
|
| 262 |
ws["D11"].alignment = Alignment(wrap_text=True)
|
| 263 |
+
|
| 264 |
ws["D22"] = preview_goals
|
| 265 |
+
# (โ
) ์ปจ์คํ
๋ชฉํ ์ถ๋ ฅ๋(D22) ์์๋(์์ง) + ์ข์ฐ(์ํ) ๊ฐ์ด๋ฐ ์ ๋ ฌ
|
| 266 |
+
ws["D22"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 267 |
|
| 268 |
+
# (F) ์ฌ์ง(์: 5ร5cm)
|
| 269 |
if photo1 is not None:
|
| 270 |
img1_bytes = BytesIO()
|
| 271 |
photo1.save(img1_bytes, format="PNG")
|
| 272 |
img1_bytes.seek(0)
|
| 273 |
img_for_excel_1 = ExcelImage(img1_bytes)
|
| 274 |
+
img_for_excel_1.width = int(37.79 * 5)
|
| 275 |
+
img_for_excel_1.height = int(37.79 * 5)
|
| 276 |
ws.add_image(img_for_excel_1, "B117")
|
| 277 |
|
| 278 |
if photo2 is not None:
|
|
|
|
| 280 |
photo2.save(img2_bytes, format="PNG")
|
| 281 |
img2_bytes.seek(0)
|
| 282 |
img_for_excel_2 = ExcelImage(img2_bytes)
|
| 283 |
+
img_for_excel_2.width = int(37.79 * 5)
|
| 284 |
+
img_for_excel_2.height = int(37.79 * 5)
|
| 285 |
ws.add_image(img_for_excel_2, "F117")
|
| 286 |
|
| 287 |
+
# (C) SWOT ๊ฒฐ๊ณผ(4์นธ)
|
| 288 |
ws.merge_cells("D45:H45")
|
| 289 |
ws["D45"] = strength_line
|
| 290 |
ws["D45"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
|
|
|
| 301 |
ws["D72"] = threat_line
|
| 302 |
ws["D72"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 303 |
|
| 304 |
+
# (D) ์ฌ๋ฌด๋ถ์ ๊ฒฐ๊ณผ -> E87:E90 (4์ค)
|
| 305 |
+
ws.merge_cells("E87:G87")
|
| 306 |
+
ws["E87"] = lines[0] if len(lines) > 0 else ""
|
| 307 |
+
ws["E87"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 308 |
+
|
| 309 |
+
ws.merge_cells("E88:G88")
|
| 310 |
+
ws["E88"] = lines[1] if len(lines) > 1 else ""
|
| 311 |
+
ws["E88"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 312 |
+
|
| 313 |
+
ws.merge_cells("E89:G89")
|
| 314 |
+
ws["E89"] = lines[2] if len(lines) > 2 else ""
|
| 315 |
+
ws["E89"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 316 |
+
|
| 317 |
+
ws.merge_cells("E90:G90")
|
| 318 |
+
ws["E90"] = lines[3] if len(lines) > 3 else ""
|
| 319 |
+
ws["E90"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
| 320 |
+
|
| 321 |
+
# (E) ์๊ถ๋ถ์ ๊ฒฐ๊ณผ -> D101:H101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
ws.merge_cells("D101:H101")
|
| 323 |
ws["D101"] = market_result
|
| 324 |
ws["D101"].alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
|
|
|
|
| 366 |
|
| 367 |
gr.Markdown("---")
|
| 368 |
|
| 369 |
+
# (C) SWOT
|
| 370 |
strengths_input = gr.Textbox(label="๊ฐ์ ")
|
| 371 |
weaknesses_input = gr.Textbox(label="์ฝ์ ")
|
| 372 |
opportunities_input = gr.Textbox(label="๊ธฐํ")
|
|
|
|
| 374 |
|
| 375 |
gr.Markdown("---")
|
| 376 |
|
| 377 |
+
# (D) ์ฌ๋ฌด
|
| 378 |
with gr.Row():
|
| 379 |
avg_monthly_sales_input = gr.Textbox(label="์ํ๊ท ๋งค์ถ์ก")
|
| 380 |
rent_input = gr.Textbox(label="์์ฐจ๋ฃ")
|
|
|
|
| 395 |
|
| 396 |
gr.Markdown("---")
|
| 397 |
|
| 398 |
+
# (F) ์ฌ์ง
|
| 399 |
with gr.Row():
|
| 400 |
photo_input_1 = gr.Image(label="์์ง์
์ฒด์ฌ์ง1", type="pil")
|
| 401 |
photo_input_2 = gr.Image(label="์์ง์
์ฒด์ฌ์ง2", type="pil")
|
|
|
|
| 423 |
difficulties_input,
|
| 424 |
goals_input,
|
| 425 |
|
| 426 |
+
# (C)
|
| 427 |
strengths_input,
|
| 428 |
weaknesses_input,
|
| 429 |
opportunities_input,
|
| 430 |
threats_input,
|
| 431 |
|
| 432 |
+
# (D)
|
| 433 |
avg_monthly_sales_input,
|
| 434 |
rent_input,
|
| 435 |
labor_cost_input,
|