Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1328,27 +1328,55 @@ def compute_relevance_scores(prompt: str, categories: list[Category]) -> dict:
|
|
| 1328 |
if main_purpose:
|
| 1329 |
purpose_category_weights = {
|
| 1330 |
'cost_reduction': {
|
|
|
|
| 1331 |
'๊ตฌ์กฐ์ ๋ณํ': 1.5, 'ํํ์ ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.5,
|
| 1332 |
-
'Structural Change': 1.5, 'Chemical Change': 1.3, 'Business Ideas': 1.5
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1333 |
},
|
| 1334 |
'innovation': {
|
|
|
|
| 1335 |
'์ผ์ ๊ธฐ๋ฅ': 1.5, 'ํ๋ฉด ๋ฐ ์ธ๊ด ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.5,
|
| 1336 |
-
'Sensor Functions': 1.5, 'Surface and Appearance Change': 1.3, 'Business Ideas': 1.5
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1337 |
},
|
| 1338 |
'risk_management': {
|
|
|
|
| 1339 |
'ํ๊ฒฝ ์ํธ์์ฉ': 1.5, '์๊ฐ ๊ด๋ จ ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.4,
|
| 1340 |
-
'Environmental Interaction': 1.5, 'Time-Related Change': 1.3, 'Business Ideas': 1.4
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1341 |
},
|
| 1342 |
'growth': {
|
|
|
|
| 1343 |
'ํฌ๊ธฐ์ ํํ ๋ณํ': 1.4, '๋น์ฆ๋์ค ์์ด๋์ด': 1.6, '๊ตฌ์กฐ์ ๋ณํ': 1.3,
|
| 1344 |
-
'Size and Shape Change': 1.4, 'Business Ideas': 1.6, 'Structural Change': 1.3
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1345 |
},
|
| 1346 |
'customer': {
|
|
|
|
| 1347 |
'ํ๋ฉด ๋ฐ ์ธ๊ด ๋ณํ': 1.5, '์ผ์ ๊ธฐ๋ฅ': 1.4, '๋น๊ณผ ์๊ฐ ํจ๊ณผ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.4,
|
| 1348 |
'Surface and Appearance Change': 1.5, 'Sensor Functions': 1.4,
|
| 1349 |
-
'Light and Visual Effects': 1.3, 'Business Ideas': 1.4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1350 |
}
|
| 1351 |
}
|
|
|
|
|
|
|
| 1352 |
if category.name_ko in purpose_category_weights.get(main_purpose, {}):
|
| 1353 |
cat_score *= purpose_category_weights[main_purpose][category.name_ko]
|
| 1354 |
elif category.name_en in purpose_category_weights.get(main_purpose, {}):
|
|
|
|
| 1328 |
if main_purpose:
|
| 1329 |
purpose_category_weights = {
|
| 1330 |
'cost_reduction': {
|
| 1331 |
+
# ๊ธฐ์กด ํญ๋ชฉ
|
| 1332 |
'๊ตฌ์กฐ์ ๋ณํ': 1.5, 'ํํ์ ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.5,
|
| 1333 |
+
'Structural Change': 1.5, 'Chemical Change': 1.3, 'Business Ideas': 1.5,
|
| 1334 |
+
# ์ถ๊ฐ ํญ๋ชฉ
|
| 1335 |
+
'์๋์ง ๋ณํ ๋ฐ ๊ด๋ฆฌ': 1.6, '๋ฐ์ดํฐ ๋ฐ ์ ๋ณด ๋ณํ': 1.4, '์ง์๊ฐ๋ฅ์ฑ ๋ฐ ํ๊ฒฝ ์ํฅ': 1.3,
|
| 1336 |
+
'Energy Conversion and Management': 1.6, 'Data and Information Transformation': 1.4,
|
| 1337 |
+
'Sustainability and Environmental Impact': 1.3
|
| 1338 |
},
|
| 1339 |
'innovation': {
|
| 1340 |
+
# ๊ธฐ์กด ํญ๋ชฉ
|
| 1341 |
'์ผ์ ๊ธฐ๋ฅ': 1.5, 'ํ๋ฉด ๋ฐ ์ธ๊ด ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.5,
|
| 1342 |
+
'Sensor Functions': 1.5, 'Surface and Appearance Change': 1.3, 'Business Ideas': 1.5,
|
| 1343 |
+
# ์ถ๊ฐ ํญ๋ชฉ
|
| 1344 |
+
'์ฌ์ฉ์ ์ธํฐํ์ด์ค ๋ฐ ์ํธ์์ฉ': 1.6, '๋ฐ์ดํฐ ๋ฐ ์ ๋ณด ๋ณํ': 1.4, '์ธ์ง ๋ฐ ์ฌ๋ฆฌ์ ๋ณํ': 1.3,
|
| 1345 |
+
'User Interface and Interaction': 1.6, 'Data and Information Transformation': 1.4,
|
| 1346 |
+
'Cognitive and Psychological Changes': 1.3
|
| 1347 |
},
|
| 1348 |
'risk_management': {
|
| 1349 |
+
# ๊ธฐ์กด ํญ๋ชฉ
|
| 1350 |
'ํ๊ฒฝ ์ํธ์์ฉ': 1.5, '์๊ฐ ๊ด๋ จ ๋ณํ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.4,
|
| 1351 |
+
'Environmental Interaction': 1.5, 'Time-Related Change': 1.3, 'Business Ideas': 1.4,
|
| 1352 |
+
# ์ถ๊ฐ ํญ๋ชฉ
|
| 1353 |
+
'๋ณด์ ๋ฐ ํ๋ผ์ด๋ฒ์': 1.7, '์ง์๊ฐ๋ฅ์ฑ ๋ฐ ํ๊ฒฝ ์ํฅ': 1.5, '๋ฐ์ดํฐ ๋ฐ ์ ๋ณด ๋ณํ': 1.4,
|
| 1354 |
+
'Security and Privacy': 1.7, 'Sustainability and Environmental Impact': 1.5,
|
| 1355 |
+
'Data and Information Transformation': 1.4
|
| 1356 |
},
|
| 1357 |
'growth': {
|
| 1358 |
+
# ๊ธฐ์กด ํญ๋ชฉ
|
| 1359 |
'ํฌ๊ธฐ์ ํํ ๋ณํ': 1.4, '๋น์ฆ๋์ค ์์ด๋์ด': 1.6, '๊ตฌ์กฐ์ ๋ณํ': 1.3,
|
| 1360 |
+
'Size and Shape Change': 1.4, 'Business Ideas': 1.6, 'Structural Change': 1.3,
|
| 1361 |
+
# ์ถ๊ฐ ํญ๋ชฉ
|
| 1362 |
+
'์ฌํ์ ์ํธ์์ฉ ๋ฐ ํ์
': 1.5, '๋ฐ์ดํฐ ๋ฐ ์ ๋ณด ๋ณํ': 1.4, '์ฌ์ฉ์ ์ธํฐํ์ด์ค ๋ฐ ์ํธ์์ฉ': 1.3,
|
| 1363 |
+
'Social Interaction and Collaboration': 1.5, 'Data and Information Transformation': 1.4,
|
| 1364 |
+
'User Interface and Interaction': 1.3
|
| 1365 |
},
|
| 1366 |
'customer': {
|
| 1367 |
+
# ๊ธฐ์กด ํญ๋ชฉ
|
| 1368 |
'ํ๋ฉด ๋ฐ ์ธ๊ด ๋ณํ': 1.5, '์ผ์ ๊ธฐ๋ฅ': 1.4, '๋น๊ณผ ์๊ฐ ํจ๊ณผ': 1.3, '๋น์ฆ๋์ค ์์ด๋์ด': 1.4,
|
| 1369 |
'Surface and Appearance Change': 1.5, 'Sensor Functions': 1.4,
|
| 1370 |
+
'Light and Visual Effects': 1.3, 'Business Ideas': 1.4,
|
| 1371 |
+
# ์ถ๊ฐ ํญ๋ชฉ
|
| 1372 |
+
'์ฌ์ฉ์ ์ธํฐํ์ด์ค ๋ฐ ์ํธ์์ฉ': 1.7, '๋ฏธํ ๋ฐ ๊ฐ์ฑ ๊ฒฝํ': 1.6, '์ธ์ง ๋ฐ ์ฌ๋ฆฌ์ ๋ณํ': 1.5,
|
| 1373 |
+
'์ฌํ์ ์ํธ์์ฉ ๋ฐ ํ์
': 1.4,
|
| 1374 |
+
'User Interface and Interaction': 1.7, 'Aesthetics and Emotional Experience': 1.6,
|
| 1375 |
+
'Cognitive and Psychological Changes': 1.5, 'Social Interaction and Collaboration': 1.4
|
| 1376 |
}
|
| 1377 |
}
|
| 1378 |
+
|
| 1379 |
+
|
| 1380 |
if category.name_ko in purpose_category_weights.get(main_purpose, {}):
|
| 1381 |
cat_score *= purpose_category_weights[main_purpose][category.name_ko]
|
| 1382 |
elif category.name_en in purpose_category_weights.get(main_purpose, {}):
|