Spaces:
Running
Running
| <html lang="ko"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>LLM Creativity Battle Arena</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| padding: 20px; | |
| } | |
| .container { | |
| max-width: 1400px; | |
| margin: 0 auto; | |
| } | |
| .header { | |
| background: white; | |
| border-radius: 20px; | |
| padding: 30px; | |
| margin-bottom: 30px; | |
| box-shadow: 0 10px 30px rgba(0,0,0,0.1); | |
| text-align: center; | |
| } | |
| .header h1 { | |
| color: #333; | |
| font-size: 2.5em; | |
| margin-bottom: 10px; | |
| } | |
| .header p { | |
| color: #666; | |
| font-size: 1.1em; | |
| } | |
| .main-content { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 30px; | |
| margin-bottom: 30px; | |
| } | |
| .battle-arena { | |
| grid-column: 1 / -1; | |
| background: white; | |
| border-radius: 20px; | |
| padding: 30px; | |
| box-shadow: 0 10px 30px rgba(0,0,0,0.1); | |
| } | |
| .prompt-section { | |
| background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); | |
| border-radius: 15px; | |
| padding: 25px; | |
| margin-bottom: 30px; | |
| color: white; | |
| } | |
| .prompt-category { | |
| display: inline-block; | |
| background: rgba(255,255,255,0.3); | |
| padding: 5px 15px; | |
| border-radius: 20px; | |
| margin-bottom: 15px; | |
| font-size: 0.9em; | |
| } | |
| .prompt-text { | |
| font-size: 1.3em; | |
| font-weight: bold; | |
| line-height: 1.5; | |
| } | |
| .responses-container { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: 30px; | |
| margin-bottom: 30px; | |
| } | |
| .response-box { | |
| background: #f8f9fa; | |
| border-radius: 15px; | |
| padding: 25px; | |
| position: relative; | |
| min-height: 300px; | |
| transition: all 0.3s ease; | |
| } | |
| .response-box:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 15px 40px rgba(0,0,0,0.1); | |
| } | |
| .response-label { | |
| position: absolute; | |
| top: -15px; | |
| left: 20px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| padding: 8px 20px; | |
| border-radius: 20px; | |
| font-weight: bold; | |
| font-size: 1.2em; | |
| } | |
| .response-content { | |
| margin-top: 20px; | |
| line-height: 1.6; | |
| color: #333; | |
| max-height: 400px; | |
| overflow-y: auto; | |
| } | |
| .model-reveal { | |
| display: none; | |
| margin-top: 20px; | |
| padding: 15px; | |
| background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%); | |
| border-radius: 10px; | |
| text-align: center; | |
| } | |
| .model-reveal.show { | |
| display: block; | |
| animation: fadeIn 0.5s ease; | |
| } | |
| .model-name { | |
| font-size: 1.3em; | |
| font-weight: bold; | |
| color: #00796b; | |
| } | |
| .vote-section { | |
| text-align: center; | |
| margin: 30px 0; | |
| } | |
| .vote-buttons { | |
| display: flex; | |
| justify-content: center; | |
| gap: 30px; | |
| margin-bottom: 20px; | |
| } | |
| .vote-btn { | |
| padding: 15px 50px; | |
| font-size: 1.2em; | |
| font-weight: bold; | |
| border: none; | |
| border-radius: 30px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| color: white; | |
| } | |
| .vote-btn-a { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| } | |
| .vote-btn-b { | |
| background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); | |
| } | |
| .vote-btn:hover { | |
| transform: scale(1.05); | |
| box-shadow: 0 10px 25px rgba(0,0,0,0.2); | |
| } | |
| .vote-btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .leaderboard { | |
| background: white; | |
| border-radius: 20px; | |
| padding: 30px; | |
| box-shadow: 0 10px 30px rgba(0,0,0,0.1); | |
| } | |
| .leaderboard h2 { | |
| color: #333; | |
| margin-bottom: 25px; | |
| font-size: 2em; | |
| text-align: center; | |
| } | |
| .leaderboard-table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| } | |
| .leaderboard-table th { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| padding: 15px 10px; | |
| text-align: left; | |
| font-size: 0.9em; | |
| } | |
| .leaderboard-table td { | |
| padding: 12px 10px; | |
| border-bottom: 1px solid #e0e0e0; | |
| font-size: 0.95em; | |
| } | |
| .leaderboard-table tr:hover { | |
| background: #f5f5f5; | |
| } | |
| .rank-medal { | |
| display: inline-block; | |
| width: 30px; | |
| text-align: center; | |
| } | |
| .rank-1 { color: #ffd700; font-size: 1.5em; } | |
| .rank-2 { color: #c0c0c0; font-size: 1.4em; } | |
| .rank-3 { color: #cd7f32; font-size: 1.3em; } | |
| .score-cell { | |
| font-weight: bold; | |
| text-align: center; | |
| } | |
| .score-high { color: #4caf50; } | |
| .score-medium { color: #ff9800; } | |
| .score-low { color: #f44336; } | |
| .category-tabs { | |
| display: flex; | |
| gap: 10px; | |
| margin-bottom: 25px; | |
| flex-wrap: wrap; | |
| } | |
| .category-tab { | |
| padding: 10px 20px; | |
| background: #f0f0f0; | |
| border: none; | |
| border-radius: 20px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| font-weight: 500; | |
| } | |
| .category-tab.active { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| } | |
| .new-battle-btn { | |
| display: block; | |
| margin: 30px auto; | |
| padding: 15px 40px; | |
| font-size: 1.1em; | |
| font-weight: bold; | |
| background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 30px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| } | |
| .new-battle-btn:hover { | |
| transform: scale(1.05); | |
| box-shadow: 0 10px 25px rgba(76,175,80,0.3); | |
| } | |
| .stats-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 20px; | |
| margin-top: 30px; | |
| } | |
| .stat-card { | |
| background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); | |
| border-radius: 15px; | |
| padding: 20px; | |
| text-align: center; | |
| } | |
| .stat-value { | |
| font-size: 2em; | |
| font-weight: bold; | |
| color: #667eea; | |
| } | |
| .stat-label { | |
| color: #666; | |
| margin-top: 5px; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .loading { | |
| display: inline-block; | |
| width: 20px; | |
| height: 20px; | |
| border: 3px solid rgba(0,0,0,.1); | |
| border-radius: 50%; | |
| border-top-color: #667eea; | |
| animation: spin 1s ease-in-out infinite; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |
| .elo-badge { | |
| display: inline-block; | |
| background: #ff6b6b; | |
| color: white; | |
| padding: 3px 8px; | |
| border-radius: 10px; | |
| font-size: 0.85em; | |
| margin-left: 5px; | |
| } | |
| .win-rate { | |
| display: inline-block; | |
| padding: 3px 8px; | |
| border-radius: 10px; | |
| font-size: 0.85em; | |
| } | |
| .win-rate-high { background: #c8e6c9; color: #2e7d32; } | |
| .win-rate-medium { background: #fff3e0; color: #e65100; } | |
| .win-rate-low { background: #ffebee; color: #c62828; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="header"> | |
| <h1>๐จ LLM ์ฐฝ์์ฑ ๋ฐฐํ ์๋ ๋</h1> | |
| <p>AI๋ค์ ์ฐฝ์์ ๋ฅ๋ ฅ์ ๊ฒจ๋ฃจ๋ ์ค์๊ฐ ๋๊ฒฐ ์์คํ </p> | |
| </div> | |
| <div class="battle-arena"> | |
| <div class="prompt-section"> | |
| <div class="prompt-category" id="promptCategory">๐ก ํ์ /๋ฐ๋ช </div> | |
| <div class="prompt-text" id="promptText"> | |
| 2050๋ ์ธ๋ฅ๊ฐ ํ์ฑ์ ์ ์ฐฉํ์ต๋๋ค. ํ์ฑ์์ ๊ฐ์ฅ ๋จผ์ ํ์ํ ๋น์ฆ๋์ค 3๊ฐ์ง๋ฅผ ์ ์ํ๊ณ , ๊ฐ๊ฐ์ ์์ต ๋ชจ๋ธ์ ์ค๋ช ํด์ฃผ์ธ์. | |
| </div> | |
| </div> | |
| <div class="responses-container"> | |
| <div class="response-box"> | |
| <div class="response-label">๋ชจ๋ธ A</div> | |
| <div class="response-content" id="responseA"> | |
| <div class="loading"></div> ์๋ต ์์ฑ ์ค... | |
| </div> | |
| <div class="model-reveal" id="modelA"> | |
| <div class="model-name">GPT-4</div> | |
| </div> | |
| </div> | |
| <div class="response-box"> | |
| <div class="response-label">๋ชจ๋ธ B</div> | |
| <div class="response-content" id="responseB"> | |
| <div class="loading"></div> ์๋ต ์์ฑ ์ค... | |
| </div> | |
| <div class="model-reveal" id="modelB"> | |
| <div class="model-name">Claude 3</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="vote-section"> | |
| <div class="vote-buttons"> | |
| <button class="vote-btn vote-btn-a" onclick="vote('A')">๐ ฐ๏ธ ๋ชจ๋ธ A ์ ํ</button> | |
| <button class="vote-btn vote-btn-b" onclick="vote('B')">๐ ฑ๏ธ ๋ชจ๋ธ B ์ ํ</button> | |
| </div> | |
| <button class="new-battle-btn" onclick="newBattle()">๐ ์๋ก์ด ๋๊ฒฐ ์์</button> | |
| </div> | |
| </div> | |
| <div class="leaderboard"> | |
| <h2>๐ ์ฐฝ์์ฑ ๋ฆฌ๋๋ณด๋</h2> | |
| <div class="category-tabs"> | |
| <button class="category-tab active" onclick="filterLeaderboard('overall')">์ข ํฉ</button> | |
| <button class="category-tab" onclick="filterLeaderboard('storytelling')">์คํ ๋ฆฌํ ๋ง</button> | |
| <button class="category-tab" onclick="filterLeaderboard('innovation')">๋ฐ๋ช /ํ์ </button> | |
| <button class="category-tab" onclick="filterLeaderboard('business')">๋น์ฆ๋์ค</button> | |
| <button class="category-tab" onclick="filterLeaderboard('artistic')">์์ ์ฑ</button> | |
| <button class="category-tab" onclick="filterLeaderboard('problem')">๋ฌธ์ ํด๊ฒฐ</button> | |
| </div> | |
| <table class="leaderboard-table"> | |
| <thead> | |
| <tr> | |
| <th>์์</th> | |
| <th>LLM ๋ชจ๋ธ</th> | |
| <th>์ข ํฉ์ ์</th> | |
| <th>์คํ ๋ฆฌ</th> | |
| <th>ํ์ </th> | |
| <th>๋น์ฆ๋์ค</th> | |
| <th>์์ </th> | |
| <th>๋ฌธ์ ํด๊ฒฐ</th> | |
| <th>๋๊ฒฐ์</th> | |
| <th>์น๋ฅ </th> | |
| <th>ELO</th> | |
| </tr> | |
| </thead> | |
| <tbody id="leaderboardBody"> | |
| <!-- ๋์ ์ผ๋ก ์์ฑ๋จ --> | |
| </tbody> | |
| </table> | |
| <div class="stats-grid"> | |
| <div class="stat-card"> | |
| <div class="stat-value">1,234</div> | |
| <div class="stat-label">์ด ๋๊ฒฐ ์</div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-value">56</div> | |
| <div class="stat-label">์ฐธ์ฌ ๋ชจ๋ธ ์</div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-value">8.7</div> | |
| <div class="stat-label">ํ๊ท ์ฐฝ์์ฑ ์ ์</div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-value">92%</div> | |
| <div class="stat-label">์ฌ์ฉ์ ๋ง์กฑ๋</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // ํ๋กฌํํธ ์นดํ ๊ณ ๋ฆฌ ๋ฐ ์์ | |
| const PROMPT_CATEGORIES = { | |
| storytelling: { | |
| name: "๐ ์คํ ๋ฆฌํ ๋ง", | |
| prompts: [ | |
| "2050๋ ์์ธ์ ํ๋ฃจ๋ฅผ ๋ฌ์ฌํด์ฃผ์ธ์", | |
| "๊ฐ๋ฏธ๊ฐ ์ฃผ์ธ๊ณต์ธ SF ์์ค์ ์ฒซ ์ฅ์ ์จ์ฃผ์ธ์", | |
| "๋ฐฑ์ค๊ณต์ฃผ๋ฅผ ์ฌ์ด๋ฒํํฌ ๋ฒ์ ์ผ๋ก ์ฌํด์ํด์ฃผ์ธ์" | |
| ] | |
| }, | |
| innovation: { | |
| name: "๐ก ๋ฐ๋ช /ํ์ ", | |
| prompts: [ | |
| "ํ๋ผ์คํฑ ์ฐ๋ ๊ธฐ๋ฅผ ํด๊ฒฐํ ํ์ ์ ์ธ ๋ฐฉ๋ฒ์ ์ ์ํ์ธ์", | |
| "๋ฏธ๋์ ๊ตํต์๋จ์ ๋์์ธํด์ฃผ์ธ์", | |
| "๋ ธ์ธ๋ค์ ์ํ ์๋ก์ด SNS ์๋น์ค๋ฅผ ๊ธฐํํ์ธ์" | |
| ] | |
| }, | |
| business: { | |
| name: "๐ผ ๋น์ฆ๋์ค", | |
| prompts: [ | |
| "ํ์ฑ์ ์ฒซ ๋ฒ์งธ๋ก ์ธ์ธ ๋น์ฆ๋์ค๋ ๋ฌด์์ผ๊น์?", | |
| "Z์ธ๋๋ฅผ ์ํ ์๋ก์ด ๊ธ์ต ์๋น์ค๋ฅผ ์ ์ํ์ธ์", | |
| "์ ํต ์์ฅ์ ํ์ฑํํ ๋์งํธ ์ ๋ต์ ์๋ฆฝํ์ธ์" | |
| ] | |
| }, | |
| artistic: { | |
| name: "๐ญ ์์ ์ ์ฐฝ์์ฑ", | |
| prompts: [ | |
| "AI์ ์ธ๊ฐ์ ์ฌ๋์ ์ฃผ์ ๋ก ํ ์๋ฅผ ์จ์ฃผ์ธ์", | |
| "์ฐ์ฃผ๋ฅผ ๋ฐฐ๊ฒฝ์ผ๋ก ํ ๋ฎค์ง์ปฌ์ ์ค๊ฑฐ๋ฆฌ๋ฅผ ๋ง๋ค์ด์ฃผ์ธ์", | |
| "์๊ฐ ์ฌํ ๊ฒ์์ ์คํ ๋ฆฌ๋ผ์ธ์ ์์ฑํ์ธ์" | |
| ] | |
| }, | |
| problem: { | |
| name: "๐งฉ ๋ฌธ์ ํด๊ฒฐ", | |
| prompts: [ | |
| "๋ฌด์ธ๋์์ ์ค๋งํธํฐ ํ๋๋ก ์์กดํ๋ ๋ฐฉ๋ฒ", | |
| "์ธ๊ณ์ธ๊ณผ์ ์ฒซ ๋ง๋จ์ ์ค๋นํ๋ ํ๋กํ ์ฝ", | |
| "100๋ ํ ์ธ๋ฅ์๊ฒ ๋ฉ์์ง๋ฅผ ์ ๋ฌํ๋ ๋ฐฉ๋ฒ" | |
| ] | |
| } | |
| }; | |
| // ์ํ LLM ๋ชจ๋ธ ๋ชฉ๋ก | |
| const LLM_MODELS = [ | |
| "GPT-4", "Claude 3", "Gemini Pro", "LLaMA 3", "Mistral Large", | |
| "PaLM 2", "Qwen 2", "Yi-34B", "Falcon 180B", "MPT-30B" | |
| ]; | |
| // ์ํ ๋ฆฌ๋๋ณด๋ ๋ฐ์ดํฐ | |
| const leaderboardData = [ | |
| { | |
| model: "GPT-4", | |
| overall: 9.2, | |
| storytelling: 9.5, | |
| innovation: 9.0, | |
| business: 9.3, | |
| artistic: 9.1, | |
| problem: 9.0, | |
| battles: 523, | |
| winRate: 78.5, | |
| elo: 2150 | |
| }, | |
| { | |
| model: "Claude 3", | |
| overall: 9.0, | |
| storytelling: 9.2, | |
| innovation: 8.8, | |
| business: 9.1, | |
| artistic: 9.0, | |
| problem: 8.9, | |
| battles: 487, | |
| winRate: 75.2, | |
| elo: 2120 | |
| }, | |
| { | |
| model: "Gemini Pro", | |
| overall: 8.8, | |
| storytelling: 8.7, | |
| innovation: 8.9, | |
| business: 8.8, | |
| artistic: 8.6, | |
| problem: 9.0, | |
| battles: 412, | |
| winRate: 71.8, | |
| elo: 2080 | |
| }, | |
| { | |
| model: "LLaMA 3", | |
| overall: 8.5, | |
| storytelling: 8.4, | |
| innovation: 8.6, | |
| business: 8.3, | |
| artistic: 8.5, | |
| problem: 8.7, | |
| battles: 356, | |
| winRate: 68.4, | |
| elo: 2040 | |
| }, | |
| { | |
| model: "Mistral Large", | |
| overall: 8.3, | |
| storytelling: 8.2, | |
| innovation: 8.4, | |
| business: 8.1, | |
| artistic: 8.3, | |
| problem: 8.5, | |
| battles: 298, | |
| winRate: 64.7, | |
| elo: 2000 | |
| } | |
| ]; | |
| let currentModels = []; | |
| let hasVoted = false; | |
| // ๋ฆฌ๋๋ณด๋ ๋ ๋๋ง | |
| function renderLeaderboard(category = 'overall') { | |
| const tbody = document.getElementById('leaderboardBody'); | |
| tbody.innerHTML = ''; | |
| // ์นดํ ๊ณ ๋ฆฌ๋ณ ์ ๋ ฌ | |
| let sortedData = [...leaderboardData]; | |
| if (category !== 'overall') { | |
| sortedData.sort((a, b) => b[category] - a[category]); | |
| } else { | |
| sortedData.sort((a, b) => b.overall - a.overall); | |
| } | |
| sortedData.forEach((item, index) => { | |
| const row = tbody.insertRow(); | |
| // ์์ | |
| const rankCell = row.insertCell(); | |
| if (index === 0) rankCell.innerHTML = '<span class="rank-medal rank-1">๐ฅ</span>'; | |
| else if (index === 1) rankCell.innerHTML = '<span class="rank-medal rank-2">๐ฅ</span>'; | |
| else if (index === 2) rankCell.innerHTML = '<span class="rank-medal rank-3">๐ฅ</span>'; | |
| else rankCell.textContent = index + 1; | |
| // ๋ชจ๋ธ๋ช | |
| row.insertCell().textContent = item.model; | |
| // ์ ์๋ค | |
| const scoreClasses = (score) => { | |
| if (score >= 9) return 'score-high'; | |
| if (score >= 8) return 'score-medium'; | |
| return 'score-low'; | |
| }; | |
| const overallCell = row.insertCell(); | |
| overallCell.className = 'score-cell ' + scoreClasses(item.overall); | |
| overallCell.textContent = item.overall.toFixed(1); | |
| const storyCell = row.insertCell(); | |
| storyCell.className = 'score-cell ' + scoreClasses(item.storytelling); | |
| storyCell.textContent = item.storytelling.toFixed(1); | |
| const innovationCell = row.insertCell(); | |
| innovationCell.className = 'score-cell ' + scoreClasses(item.innovation); | |
| innovationCell.textContent = item.innovation.toFixed(1); | |
| const businessCell = row.insertCell(); | |
| businessCell.className = 'score-cell ' + scoreClasses(item.business); | |
| businessCell.textContent = item.business.toFixed(1); | |
| const artisticCell = row.insertCell(); | |
| artisticCell.className = 'score-cell ' + scoreClasses(item.artistic); | |
| artisticCell.textContent = item.artistic.toFixed(1); | |
| const problemCell = row.insertCell(); | |
| problemCell.className = 'score-cell ' + scoreClasses(item.problem); | |
| problemCell.textContent = item.problem.toFixed(1); | |
| // ๋๊ฒฐ ์ | |
| row.insertCell().textContent = item.battles; | |
| // ์น๋ฅ | |
| const winRateCell = row.insertCell(); | |
| const winRateClass = item.winRate >= 70 ? 'win-rate-high' : | |
| item.winRate >= 50 ? 'win-rate-medium' : 'win-rate-low'; | |
| winRateCell.innerHTML = `<span class="win-rate ${winRateClass}">${item.winRate}%</span>`; | |
| // ELO | |
| const eloCell = row.insertCell(); | |
| eloCell.innerHTML = `${item.elo}<span class="elo-badge">ELO</span>`; | |
| }); | |
| } | |
| // ์นดํ ๊ณ ๋ฆฌ ํํฐ | |
| function filterLeaderboard(category) { | |
| // ํญ ํ์ฑํ ์ํ ๋ณ๊ฒฝ | |
| document.querySelectorAll('.category-tab').forEach(tab => { | |
| tab.classList.remove('active'); | |
| }); | |
| event.target.classList.add('active'); | |
| // ๋ฆฌ๋๋ณด๋ ์ฌ๋ ๋๋ง | |
| renderLeaderboard(category); | |
| } | |
| // ์๋ก์ด ๋ฐฐํ ์์ | |
| function newBattle() { | |
| hasVoted = false; | |
| // ๋ฒํผ ํ์ฑํ | |
| document.querySelectorAll('.vote-btn').forEach(btn => { | |
| btn.disabled = false; | |
| }); | |
| // ๋ชจ๋ธ ์ ๋ณด ์จ๊ธฐ๊ธฐ | |
| document.querySelectorAll('.model-reveal').forEach(el => { | |
| el.classList.remove('show'); | |
| }); | |
| // ๋๋ค ์นดํ ๊ณ ๋ฆฌ ์ ํ | |
| const categories = Object.keys(PROMPT_CATEGORIES); | |
| const randomCategory = categories[Math.floor(Math.random() * categories.length)]; | |
| const category = PROMPT_CATEGORIES[randomCategory]; | |
| // ๋๋ค ํ๋กฌํํธ ์ ํ | |
| const randomPrompt = category.prompts[Math.floor(Math.random() * category.prompts.length)]; | |
| // ํ๋กฌํํธ ํ์ | |
| document.getElementById('promptCategory').textContent = category.name; | |
| document.getElementById('promptText').textContent = randomPrompt; | |
| // ๋๋ค์ผ๋ก 2๊ฐ ๋ชจ๋ธ ์ ํ | |
| const shuffled = [...LLM_MODELS].sort(() => 0.5 - Math.random()); | |
| currentModels = shuffled.slice(0, 2); | |
| // ์๋ต ๋ก๋ฉ ์๋ฎฌ๋ ์ด์ | |
| document.getElementById('responseA').innerHTML = '<div class="loading"></div> ์๋ต ์์ฑ ์ค...'; | |
| document.getElementById('responseB').innerHTML = '<div class="loading"></div> ์๋ต ์์ฑ ์ค...'; | |
| // ์ํ ์๋ต ์์ฑ (์ค์ ๋ก๋ API ํธ์ถ) | |
| setTimeout(() => { | |
| document.getElementById('responseA').innerHTML = generateSampleResponse(randomCategory, 'A'); | |
| document.getElementById('responseB').innerHTML = generateSampleResponse(randomCategory, 'B'); | |
| }, 2000); | |
| // ๋ชจ๋ธ๋ช ์ ๋ฐ์ดํธ (์จ๊น ์ํ) | |
| document.querySelector('#modelA .model-name').textContent = currentModels[0]; | |
| document.querySelector('#modelB .model-name').textContent = currentModels[1]; | |
| } | |
| // ์ํ ์๋ต ์์ฑ | |
| function generateSampleResponse(category, model) { | |
| const responses = { | |
| innovation: { | |
| A: `ํ์ฑ ์ ์ฐฉ ๋น์ฆ๋์ค TOP 3: | |
| 1. **ํ์ฑ ์ฐ์ ๋ฑ ํฌ (Mars O2 Bank)** | |
| - ์๋น์ค: ๊ฐ์ธ/๊ธฐ์ ์ฉ ์ฐ์ ์์ฐ, ์ ์ฅ, ๋ฐฐ๊ธ | |
| - ์์ต๋ชจ๋ธ: ์ ๊ตฌ๋ ์ + ํ๋ฆฌ๋ฏธ์ ์๋ ์ต์ | |
| - ์์ ์์ต: ์ฐ 500์ต ํ์ฑ๋ฌ๋ฌ | |
| 2. **๋ ๊ณจ๋ฆฌ์ค 3D ํ๋ฆฐํ ๊ฑด์ค** | |
| - ์๋น์ค: ํ์ฑ ํ ์์ผ๋ก ๊ฑด๋ฌผ/์ธํ๋ผ ๊ฑด์ค | |
| - ์์ต๋ชจ๋ธ: ๊ฑด์ค ํ๋ก์ ํธ ๊ณ์ฝ + ์ฅ๋น ์๋ | |
| - ์์ ์์ต: ์ฐ 300์ต ํ์ฑ๋ฌ๋ฌ | |
| 3. **์ง๊ตฌ-ํ์ฑ ํฅ์ ๋ฐฐ๋ฌ ์๋น์ค** | |
| - ์๋น์ค: ์ง๊ตฌ ์์, ๋ฌผํ์ ์ ๊ธฐ ๋ฐฐ์ก | |
| - ์์ต๋ชจ๋ธ: ๋ฐฐ์ก๋ฃ + ํ๋ฆฌ๋ฏธ์ ํ์์ | |
| - ์์ ์์ต: ์ฐ 200์ต ํ์ฑ๋ฌ๋ฌ`, | |
| B: `ํ์ฑ ํ์ ๋น์ฆ๋์ค ์ ์: | |
| 1. **ํ์๊ด ์๋์ง ๊ทธ๋ฆฌ๋** | |
| - ๊ฑฐ๋ ํ์๊ด ํจ๋ ๋์ฅ ์ด์ | |
| - ์๋์ง ํ ํฐ ๋ธ๋ก์ฒด์ธ ๊ฑฐ๋ ์์คํ | |
| - B2B/B2C ์ ๋ ฅ ๊ณต๊ธ ๊ณ์ฝ | |
| 2. **ํ์ฑ ๋์ ๋ (AgroDome)** | |
| - ์์ง๋์ฅ + ์ ์ ์ ํธ์ง ์๋ฌผ | |
| - ์๋ ์๊ธ์์กฑ ์์คํ ๊ตฌ์ถ | |
| - ๋์ฐ๋ฌผ ์ง๊ฑฐ๋ + ์ข ์ ํ๋งค | |
| 3. **์ฌ๋ฆฌ ๊ฑด๊ฐ VR ์ผํฐ** | |
| - ์ง๊ตฌ ํฅ์๋ณ ์น๋ฃ ํ๋ก๊ทธ๋จ | |
| - ๊ฐ์ํ์ค ์ง๊ตฌ ์ฒดํ๊ด | |
| - ๊ตฌ๋ ์ + ๋ง์ถคํ ์น๋ฃ ์ธ์ ` | |
| }, | |
| storytelling: { | |
| A: `2050๋ ์์ธ, ์ค์ 7์. | |
| ํ๋์ ๊ฐ๋ก์ง๋ฅด๋ ์์ดํ์๋ค์ด ์์นจ ์ถ๊ทผ๊ธธ์ ์๋ฆฐ๋ค. ํ๊ฐ์ ์ด์ ๊ฑฐ๋ํ ์์ ํ์๊ด ํจ๋๋ก ๋ฎ์ฌ์๊ณ , ๊ทธ ์๋ฅผ ๋ฌ๋ฆฌ๋ ํ์ดํผ๋ฃจํ๊ฐ 3๋ถ๋ง๋ค ์ง๋๊ฐ๋ค. | |
| ๊น๋ฏผ์ค์ ๋-์ปดํจํฐ ์ธํฐํ์ด์ค๋ก ์ค๋์ ์ผ์ ์ ํ์ธํ๋ค. ํ๋ก๊ทธ๋จ ํ์๊ฐ 2๊ฑด, ๋ฉํ๋ฒ์ค ํ๋ ์ ํ ์ด์ ์ด 1๊ฑด. ์ฐฝ ๋ฐ์ผ๋ก ๋ณด์ด๋ ๋จ์ฐํ์๋ ์ด์ ๊ฑฐ๋ํ ๊ณต๊ธฐ์ ํ ํ์๋ก ๋ณ๋ชจํ๋ค...`, | |
| B: `์์ธ, 2050๋ . | |
| ๋์๋ ์ ๋ค์ง ์๋๋ค. ๊ฑด๋ฌผ๋ค์ ์ค์ค๋ก ํธํกํ๋ฉฐ ๋๊ธฐ๋ฅผ ์ ํํ๋ค. ๊ฑฐ๋ฆฌ์ ๋๋ฌด๋ค์ ์ ์ ์ ์กฐ์์ผ๋ก ๋ฐค์๋ ์ฐ์๋ฅผ ๋ง๋ค์ด๋ธ๋ค. | |
| ์๋ฒฝ 4์, AI ๊ด์ ์ผํฐ์์ ๋์์ ํ๋ฃจ๊ฐ ์์๋๋ค. 3์ฒ๋ง ์๋ฏผ์ ์์ง์์ ์์ธกํ๊ณ , ๊ตํตํ๋ฆ์ ์ต์ ํํ๋ค. ์งํ 50๋ฏธํฐ ์๋์์ ์์จ์ฃผํ ๋ฌผ๋ฅ ๋ก๋ด๋ค์ด ์กฐ์ฉํ ๋ฌผ์๋ฅผ ์ด๋ฐํ๋ค...` | |
| } | |
| }; | |
| return responses[category]?.[model] || "์ฐฝ์์ ์ธ ์๋ต์ด ์์ฑ๋์์ต๋๋ค..."; | |
| } | |
| // ํฌํ ์ฒ๋ฆฌ | |
| function vote(choice) { | |
| if (hasVoted) return; | |
| hasVoted = true; | |
| // ๋ฒํผ ๋นํ์ฑํ | |
| document.querySelectorAll('.vote-btn').forEach(btn => { | |
| btn.disabled = true; | |
| }); | |
| // ๋ชจ๋ธ ๊ณต๊ฐ | |
| document.getElementById('modelA').classList.add('show'); | |
| document.getElementById('modelB').classList.add('show'); | |
| // ํฌํ ๊ฒฐ๊ณผ ์ ์ฅ (์ค์ ๋ก๋ ์๋ฒ๋ก ์ ์ก) | |
| const winner = choice === 'A' ? currentModels[0] : currentModels[1]; | |
| const loser = choice === 'A' ? currentModels[1] : currentModels[0]; | |
| console.log(`์น์: ${winner}, ํจ์: ${loser}`); | |
| // ์๋ฆผ | |
| setTimeout(() => { | |
| alert(`ํฌํ๊ฐ ์๋ฃ๋์์ต๋๋ค!\n์น์: ${winner}\n\nELO ๋ ์ดํ ์ด ์ ๋ฐ์ดํธ๋ฉ๋๋ค.`); | |
| }, 500); | |
| } | |
| // ํ์ด์ง ๋ก๋์ ์ด๊ธฐํ | |
| window.onload = function() { | |
| renderLeaderboard(); | |
| newBattle(); | |
| }; | |
| </script> | |
| </body> | |
| </html> |