Spaces:
Sleeping
Sleeping
File size: 36,476 Bytes
b378e61 e86e389 0cd8b82 b378e61 f6f4ad9 b378e61 e86e389 f6f4ad9 e86e389 b378e61 0cd8b82 f6f4ad9 0cd8b82 f6f4ad9 0cd8b82 f6f4ad9 b378e61 e86e389 b378e61 e86e389 b378e61 e86e389 b378e61 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 b378e61 0cd8b82 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 e86e389 f6f4ad9 b378e61 0cd8b82 b378e61 0cd8b82 b378e61 e86e389 b378e61 f6f4ad9 e86e389 f6f4ad9 e86e389 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 b378e61 f6f4ad9 b378e61 e86e389 f6f4ad9 b378e61 f6f4ad9 0cd8b82 f6f4ad9 e86e389 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 0cd8b82 b378e61 0cd8b82 f6f4ad9 b378e61 f6f4ad9 0cd8b82 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 0cd8b82 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 0cd8b82 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 e86e389 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 e86e389 f6f4ad9 b378e61 0cd8b82 b378e61 e86e389 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 f6f4ad9 b378e61 0cd8b82 f6f4ad9 0cd8b82 f6f4ad9 b378e61 0cd8b82 b378e61 e86e389 f6f4ad9 b378e61 f6f4ad9 b378e61 0cd8b82 f6f4ad9 0cd8b82 f6f4ad9 b378e61 0cd8b82 b378e61 e86e389 f6f4ad9 b378e61 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 |
import gradio as gr
import pandas as pd
import numpy as np
from datetime import datetime
import plotly.graph_objects as go
import re
from urllib.parse import urlparse
import requests
import json
import os
class StartupValuationCalculator:
def __init__(self):
# μ
μ’
λ³ λ²€μΉλ§ν¬ λ©ν°ν (EV/ARR)
self.industry_multiples = {
"SaaS - B2B": {"low": 3, "mid": 6, "high": 10},
"SaaS - B2C": {"low": 2, "mid": 4, "high": 7},
"λ§μΌνλ μ΄μ€": {"low": 2, "mid": 5, "high": 8},
"μ΄μ»€λ¨Έμ€": {"low": 1, "mid": 2.5, "high": 4},
"νν
ν¬": {"low": 3, "mid": 5, "high": 8},
"ν¬μ€μΌμ΄": {"low": 4, "mid": 7, "high": 12},
"AI/λ₯ν
ν¬": {"low": 5, "mid": 8, "high": 15},
"κΈ°ν": {"low": 2, "mid": 4, "high": 6}
}
# μ±μ₯λ₯ μ‘°μ κ³μ
self.growth_adjustments = {
"0-20%": 0.7,
"20-50%": 0.9,
"50-100%": 1.1,
"100-200%": 1.3,
"200%+": 1.5
}
# λ²ν¬μ€ λ°©λ² μΉ΄ν
κ³ λ¦¬λ³ μ΅λκ° ($500K each)
self.berkus_max_values = {
"sound_idea": 500000,
"prototype": 500000,
"quality_team": 500000,
"strategic_relationships": 500000,
"product_rollout": 500000
}
# μ€μ½μ΄μΉ΄λ κ°μ€μΉ
self.scorecard_weights = {
"team": 0.30,
"market_size": 0.25,
"product": 0.15,
"competition": 0.10,
"marketing": 0.10,
"need_for_funding": 0.05,
"other": 0.05
}
# μΈμ΄λ³ ν
μ€νΈ
self.translations = {
"ko": {
"title": "π¦ μ€ννΈμ
κ°μΉνκ° μλν μμ€ν
v3.0",
"subtitle": "λ²ν¬μ€ λ°©λ²κ³Ό μ€μ½μ΄μΉ΄λ λ°©λ²μ ν¬ν¨ν μ’
ν© νκ°",
"valuation_result": "κ°μΉνκ° κ²°κ³Ό",
"company_value": "κΈ°μ
κ°μΉ",
"arr": "μ°κ° λ°λ³΅ λ§€μΆ",
"multiple": "μ μ© λ©ν°ν",
"unit_economics": "λ¨μκ²½μ ",
"berkus_score": "λ²ν¬μ€ νκ°",
"scorecard_score": "μ€μ½μ΄μΉ΄λ νκ°",
"financial_health": "μ¬λ¬΄ 건μ μ±",
"insights": "νκ° μΈμ¬μ΄νΈ"
},
"en": {
"title": "π¦ Startup Valuation System v3.0",
"subtitle": "Comprehensive valuation with Berkus and Scorecard methods",
"valuation_result": "Valuation Result",
"company_value": "Company Value",
"arr": "Annual Recurring Revenue",
"multiple": "Applied Multiple",
"unit_economics": "Unit Economics",
"berkus_score": "Berkus Score",
"scorecard_score": "Scorecard Score",
"financial_health": "Financial Health",
"insights": "Valuation Insights"
}
}
def call_llm_api(self, prompt, api_key):
"""LLM APIλ₯Ό νΈμΆνμ¬ κ³ κΈ λΆμ μν"""
if not api_key:
return None
url = "https://api.fireworks.ai/inference/v1/chat/completions"
payload = {
"model": "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507",
"max_tokens": 4096,
"top_p": 1,
"top_k": 40,
"presence_penalty": 0,
"frequency_penalty": 0,
"temperature": 0.6,
"messages": [
{
"role": "system",
"content": "You are an expert startup valuation analyst and strategic advisor with deep knowledge of venture capital, financial analysis, and business strategy."
},
{
"role": "user",
"content": prompt
}
]
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
try:
response = requests.post(url, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
return response.json()['choices'][0]['message']['content']
else:
return None
except:
return None
def generate_strategic_report(self, data, results, language, api_key):
"""LLMμ μ¬μ©νμ¬ μ λ΅μ λ³΄κ³ μ μμ±"""
if language == "ko":
prompt = f"""
λ€μ μ€ννΈμ
μ κ°μΉνκ° κ²°κ³Όλ₯Ό λΆμνκ³ μ λ΅μ μ‘°μΈμ ν¬ν¨ν μμΈ λ³΄κ³ μλ₯Ό μμ±ν΄μ£ΌμΈμ:
νμ¬ μ 보:
- νμ¬λͺ
: {data['company_name']}
- μ€λ¦½λ
λ: {data['founded_year']}
- μ°μ
: {data['industry']}
- μ¬μ
λ¨κ³: {data['stage']}
νκ° κ²°κ³Ό:
- μ΅μ’
κΈ°μ
κ°μΉ: ${results['final_valuation']/1000000:.2f}M
- λ²ν¬μ€ νκ°: ${results['berkus_valuation']/1000000:.2f}M
- ARR: ${results['arr']/1000000:.2f}M
- μ±μ₯λ₯ : {data['growth_rate']}%
- LTV/CAC: {results['ltv_cac_ratio']:.1f}
- λ°μ¨μ΄: {results['runway']:.1f}κ°μ
- μ€μ½μ΄μΉ΄λ μ μλ€: {results['scorecard_adjustments']}
λ€μμ ν¬ν¨νμ¬ μμ±ν΄μ£ΌμΈμ:
1. κ°μΉνκ° κ²°κ³Όμ νλΉμ± λΆμ
2. λμ’
μ
κ³ λλΉ ν¬μ§μ
λ
3. μ£Όμ κ°μ κ³Ό κ°μ νμ μμ
4. ν₯ν 6-12κ°μ μ λ΅μ μ°μ μμ
5. μκΈμ‘°λ¬ μ λ΅ λ° μ μ μ‘°λ¬ κ·λͺ¨
6. μ£Όμ 리μ€ν¬μ μν λ°©μ
7. ν΅μ¬ KPIμ λ§μΌμ€ν€ μ μ
"""
else:
prompt = f"""
Please analyze the following startup valuation results and provide a comprehensive strategic report:
Company Information:
- Company Name: {data['company_name']}
- Founded: {data['founded_year']}
- Industry: {data['industry']}
- Stage: {data['stage']}
Valuation Results:
- Final Valuation: ${results['final_valuation']/1000000:.2f}M
- Berkus Valuation: ${results['berkus_valuation']/1000000:.2f}M
- ARR: ${results['arr']/1000000:.2f}M
- Growth Rate: {data['growth_rate']}%
- LTV/CAC: {results['ltv_cac_ratio']:.1f}
- Runway: {results['runway']:.1f} months
- Scorecard Scores: {results['scorecard_adjustments']}
Please include:
1. Valuation validity analysis
2. Industry positioning
3. Key strengths and improvement areas
4. Strategic priorities for next 6-12 months
5. Fundraising strategy and optimal round size
6. Key risks and mitigation strategies
7. Core KPIs and milestone recommendations
"""
llm_response = self.call_llm_api(prompt, api_key)
return llm_response
def calculate_berkus_score(self, berkus_data):
"""λ²ν¬μ€ λ°©λ²μΌλ‘ νκ° (μ΅λ $2.5M)"""
scores = {}
total = 0
# 1. 건μ ν μμ΄λμ΄ (Sound Idea)
idea_score = min(100, berkus_data["idea_validation"] + berkus_data["market_research"] * 10)
scores["sound_idea"] = self.berkus_max_values["sound_idea"] * (idea_score / 100)
# 2. νλ‘ν νμ
(Prototype)
prototype_score = 0
if berkus_data["prototype_stage"] == "μμ":
prototype_score = 0
elif berkus_data["prototype_stage"] == "컨μ
/λͺ©μ
":
prototype_score = 30
elif berkus_data["prototype_stage"] == "μλ νλ‘ν νμ
":
prototype_score = 60
elif berkus_data["prototype_stage"] == "λ² ν λ²μ ":
prototype_score = 80
elif berkus_data["prototype_stage"] == "μΆμ λ²μ ":
prototype_score = 100
scores["prototype"] = self.berkus_max_values["prototype"] * (prototype_score / 100)
# 3. μ°μν ν (Quality Team)
team_score = min(100,
min(berkus_data["team_experience"], 10) * 10 + # μ΅λ 10λ
κΉμ§λ§ κ°μ°
berkus_data["domain_expertise"] * 15 +
berkus_data["startup_experience"] * 15
)
scores["quality_team"] = self.berkus_max_values["quality_team"] * (team_score / 100)
# 4. μ λ΅μ κ΄κ³ (Strategic Relationships)
relationship_score = min(100,
berkus_data["partnerships"] * 15 +
berkus_data["advisors"] * 10 +
berkus_data["pilot_customers"] * 25
)
scores["strategic_relationships"] = self.berkus_max_values["strategic_relationships"] * (relationship_score / 100)
# 5. μ ν μΆμ/νλ§€ (Product Rollout)
if berkus_data["sales_started"]:
rollout_score = min(100, 50 + berkus_data["customer_validation"] * 10)
else:
rollout_score = berkus_data["launch_readiness"]
scores["product_rollout"] = self.berkus_max_values["product_rollout"] * (rollout_score / 100)
total = sum(scores.values())
return total, scores
def calculate_scorecard_valuation(self, scorecard_data, base_valuation):
"""μ€μ½μ΄μΉ΄λ λ°©λ²μΌλ‘ μ‘°μ λ κ°μΉνκ°"""
adjustments = {}
# κ° μμλ³ μ‘°μ λΉμ¨ κ³μ° (0.5 ~ 1.5)
adjustments["team"] = scorecard_data["team_strength"] / 100
adjustments["market_size"] = scorecard_data["market_opportunity"] / 100
adjustments["product"] = scorecard_data["product_stage"] / 100
adjustments["competition"] = scorecard_data["competitive_advantage"] / 100
adjustments["marketing"] = scorecard_data["marketing_channels"] / 100
adjustments["need_for_funding"] = scorecard_data["funding_efficiency"] / 100
adjustments["other"] = scorecard_data["other_factors"] / 100
# κ°μ€ νκ· κ³μ°
weighted_score = 0
for factor, weight in self.scorecard_weights.items():
# κ° μ μλ₯Ό 0.5 ~ 1.5 λ²μλ‘ λ³ν (50μ μ΄ 1.0)
adjusted_score = 0.5 + (adjustments[factor])
weighted_score += adjusted_score * weight
# κΈ°λ³Έ κ°μΉνκ°μ μ‘°μ λΉμ¨ μ μ©
adjusted_valuation = base_valuation * weighted_score
return adjusted_valuation, adjustments, weighted_score
def calculate_arr(self, monthly_revenue, revenue_type):
"""μ λ§€μΆμ μ°κ° λ°λ³΅ λ§€μΆ(ARR)λ‘ λ³ν"""
if revenue_type == "ꡬλ
ν (SaaS)":
return monthly_revenue * 12
elif revenue_type == "κ±°λμμλ£ν":
return monthly_revenue * 12 * 0.8
else:
return monthly_revenue * 12 * 0.6
def calculate_ltv(self, arpu, gross_margin, monthly_churn):
"""LTV κ³μ°"""
if monthly_churn == 0:
monthly_churn = 0.01
return arpu * (gross_margin / 100) / monthly_churn
def calculate_cac(self, monthly_marketing, monthly_sales, new_customers):
"""CAC κ³μ°"""
if new_customers == 0:
return 0
return (monthly_marketing + monthly_sales) / new_customers
def calculate_payback(self, cac, arpu, gross_margin):
"""Payback Period κ³μ° (κ°μ)"""
if arpu * (gross_margin / 100) == 0:
return 999
return cac / (arpu * (gross_margin / 100))
def calculate_valuation(self, data, berkus_data, scorecard_data, use_revenue_multiple=True):
"""μ’
ν© κ°μΉνκ° κ³μ°"""
results = {}
# 1. λ²ν¬μ€ λ°©λ² νκ°
berkus_valuation, berkus_scores = self.calculate_berkus_score(berkus_data)
results["berkus_valuation"] = berkus_valuation
results["berkus_scores"] = berkus_scores
# 2. λ§€μΆ κΈ°λ° νκ° (λ§€μΆμ΄ μλ κ²½μ°)
if data["monthly_revenue"] > 0 and use_revenue_multiple:
# ARR κ³μ°
arr = self.calculate_arr(data["monthly_revenue"], data["revenue_type"])
# λ¨μκ²½μ κ³μ°
ltv = self.calculate_ltv(data["arpu"], data["gross_margin"], data["monthly_churn"])
cac = self.calculate_cac(data["monthly_marketing"], data["monthly_sales"], data["new_customers"])
ltv_cac_ratio = ltv / cac if cac > 0 else 0
payback = self.calculate_payback(cac, data["arpu"], data["gross_margin"])
# λ©ν°ν κ²°μ
multiples = self.industry_multiples[data["industry"]]
growth_category = self.get_growth_category(data["growth_rate"])
growth_adj = self.growth_adjustments[growth_category]
# κΈ°λ³Έ λ©ν°ν μ ν
if ltv_cac_ratio >= 3:
base_multiple = multiples["high"]
elif ltv_cac_ratio >= 1.5:
base_multiple = multiples["mid"]
else:
base_multiple = multiples["low"]
adjusted_multiple = base_multiple * growth_adj
# λ§€μΆ κΈ°λ° κ°μΉνκ°
revenue_valuation = arr * adjusted_multiple
results["arr"] = arr
results["ltv"] = ltv
results["cac"] = cac
results["ltv_cac_ratio"] = ltv_cac_ratio
results["payback"] = payback
results["multiple"] = adjusted_multiple
else:
revenue_valuation = 0
results["arr"] = 0
results["ltv"] = 0
results["cac"] = 0
results["ltv_cac_ratio"] = 0
results["payback"] = 0
results["multiple"] = 0
# 3. κΈ°λ³Έ κ°μΉνκ° κ²°μ (λ²ν¬μ€ vs λ§€μΆ κΈ°λ°)
if revenue_valuation > berkus_valuation * 1.5:
base_valuation = revenue_valuation
valuation_method = "revenue_multiple"
else:
base_valuation = max(berkus_valuation, revenue_valuation)
valuation_method = "berkus"
# 4. μ€μ½μ΄μΉ΄λ μ‘°μ
final_valuation, scorecard_adjustments, weighted_score = self.calculate_scorecard_valuation(
scorecard_data, base_valuation
)
results["base_valuation"] = base_valuation
results["final_valuation"] = final_valuation
results["valuation_method"] = valuation_method
results["scorecard_adjustments"] = scorecard_adjustments
results["scorecard_multiplier"] = weighted_score
# 5. λ°μ¨μ΄ κ³μ°
results["runway"] = data["cash_balance"] / data["burn_rate"] if data["burn_rate"] > 0 else 999
return results
def get_growth_category(self, growth_rate):
"""μ±μ₯λ₯ μΉ΄ν
κ³ λ¦¬ κ²°μ """
if growth_rate < 20:
return "0-20%"
elif growth_rate < 50:
return "20-50%"
elif growth_rate < 100:
return "50-100%"
elif growth_rate < 200:
return "100-200%"
else:
return "200%+"
def create_valuation_comparison_chart(self, results, language="ko"):
"""νκ° λ°©λ²λ³ λΉκ΅ μ°¨νΈ"""
fig = go.Figure()
methods = ["Berkus", "Revenue Multiple", "Scorecard Adjusted"]
values = [
results["berkus_valuation"],
results["base_valuation"] if results["valuation_method"] == "revenue_multiple" else 0,
results["final_valuation"]
]
fig.add_trace(go.Bar(
x=methods,
y=values,
text=[f"${v/1000000:.2f}M" for v in values],
textposition="outside",
marker_color=["lightblue", "lightgreen", "darkblue"]
))
title = "νκ° λ°©λ²λ³ κΈ°μ
κ°μΉ λΉκ΅" if language == "ko" else "Valuation by Method"
fig.update_layout(
title=title,
yaxis_title="Valuation (USD)",
showlegend=False,
height=400
)
return fig
def create_scorecard_radar_chart(self, adjustments, language="ko"):
"""μ€μ½μ΄μΉ΄λ μμλ³ μ μ λ μ΄λ μ°¨νΈ"""
categories = list(adjustments.keys())
if language == "ko":
categories_display = ["ν", "μμ₯κ·λͺ¨", "μ ν", "κ²½μλ ₯", "λ§μΌν
", "μκΈν¨μ¨", "κΈ°ν"]
else:
categories_display = ["Team", "Market", "Product", "Competition", "Marketing", "Funding", "Other"]
values = [adjustments[cat] * 100 for cat in categories]
fig = go.Figure(data=go.Scatterpolar(
r=values,
theta=categories_display,
fill='toself'
))
title = "μ€μ½μ΄μΉ΄λ νκ° μμ" if language == "ko" else "Scorecard Factors"
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True,
range=[0, 100]
)),
showlegend=False,
title=title
)
return fig
def create_ui():
calculator = StartupValuationCalculator()
def process_valuation(
api_key, language,
# κΈ°λ³Έ μ 보
company_name, founded_year, industry, stage, revenue_type,
# λ§€μΆ μ 보
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
retention_rate, new_customers, monthly_marketing, monthly_sales,
# μ¬λ¬΄ μ 보
cash_balance, burn_rate,
# λ²ν¬μ€ λ°©λ² μ
λ ₯
idea_validation, market_research, prototype_stage, team_experience,
domain_expertise, startup_experience, partnerships, advisors,
pilot_customers, sales_started, customer_validation, launch_readiness,
# μ€μ½μ΄μΉ΄λ μ
λ ₯
team_strength, market_opportunity, product_stage, competitive_advantage,
marketing_channels, funding_efficiency, other_factors
):
# λ°μ΄ν° μ€λΉ
data = {
"company_name": company_name,
"founded_year": founded_year,
"industry": industry,
"stage": stage,
"revenue_type": revenue_type,
"monthly_revenue": monthly_revenue * 1000,
"growth_rate": growth_rate,
"arpu": arpu,
"gross_margin": gross_margin,
"monthly_churn": monthly_churn / 100,
"retention_rate": retention_rate,
"new_customers": new_customers,
"monthly_marketing": monthly_marketing * 1000,
"monthly_sales": monthly_sales * 1000,
"cash_balance": cash_balance * 1000,
"burn_rate": burn_rate * 1000
}
berkus_data = {
"idea_validation": idea_validation,
"market_research": market_research,
"prototype_stage": prototype_stage,
"team_experience": team_experience,
"domain_expertise": domain_expertise,
"startup_experience": startup_experience,
"partnerships": partnerships,
"advisors": advisors,
"pilot_customers": pilot_customers,
"sales_started": sales_started,
"customer_validation": customer_validation,
"launch_readiness": launch_readiness
}
scorecard_data = {
"team_strength": team_strength,
"market_opportunity": market_opportunity,
"product_stage": product_stage,
"competitive_advantage": competitive_advantage,
"marketing_channels": marketing_channels,
"funding_efficiency": funding_efficiency,
"other_factors": other_factors
}
# κ°μΉνκ° κ³μ°
use_revenue = monthly_revenue > 0
results = calculator.calculate_valuation(data, berkus_data, scorecard_data, use_revenue)
# μΈμ΄λ³ ν
μ€νΈ
t = calculator.translations[language]
# κ²°κ³Ό ν¬λ§·ν
if language == "ko":
valuation_text = f"""
# π {company_name} {t['valuation_result']}
## π μ’
ν© νκ°
- **{t['company_value']}**: ${results['final_valuation']/1000000:.2f}M
- **νκ° λ°©λ²**: {'λ§€μΆ λ©ν°ν' if results['valuation_method'] == 'revenue_multiple' else 'λ²ν¬μ€ λ°©λ²'} + μ€μ½μ΄μΉ΄λ μ‘°μ
- **μ€μ½μ΄μΉ΄λ μ‘°μ λ°°μ**: {results['scorecard_multiplier']:.2f}x
## π― {t['berkus_score']} (μ΅λ $2.5M)
- **μ΄ νκ°μ‘**: ${results['berkus_valuation']/1000000:.2f}M
- 건μ ν μμ΄λμ΄: ${results['berkus_scores']['sound_idea']/1000:.0f}K
- νλ‘ν νμ
: ${results['berkus_scores']['prototype']/1000:.0f}K
- μ°μν ν: ${results['berkus_scores']['quality_team']/1000:.0f}K
- μ λ΅μ κ΄κ³: ${results['berkus_scores']['strategic_relationships']/1000:.0f}K
- μ ν μΆμ: ${results['berkus_scores']['product_rollout']/1000:.0f}K
"""
else:
valuation_text = f"""
# π {company_name} {t['valuation_result']}
## π Summary
- **{t['company_value']}**: ${results['final_valuation']/1000000:.2f}M
- **Method**: {'Revenue Multiple' if results['valuation_method'] == 'revenue_multiple' else 'Berkus Method'} + Scorecard
- **Scorecard Multiplier**: {results['scorecard_multiplier']:.2f}x
## π― {t['berkus_score']} (Max $2.5M)
- **Total**: ${results['berkus_valuation']/1000000:.2f}M
- Sound Idea: ${results['berkus_scores']['sound_idea']/1000:.0f}K
- Prototype: ${results['berkus_scores']['prototype']/1000:.0f}K
- Quality Team: ${results['berkus_scores']['quality_team']/1000:.0f}K
- Strategic Relationships: ${results['berkus_scores']['strategic_relationships']/1000:.0f}K
- Product Rollout: ${results['berkus_scores']['product_rollout']/1000:.0f}K
"""
# λ§€μΆ κΈ°λ° νκ° μΆκ° (λ§€μΆμ΄ μλ κ²½μ°)
if use_revenue and results['arr'] > 0:
if language == "ko":
valuation_text += f"""
## π° λ§€μΆ κΈ°λ° νκ°
- **ARR**: ${results['arr']/1000000:.2f}M
- **μ μ© λ©ν°ν**: {results['multiple']:.1f}x
- **LTV/CAC**: {results['ltv_cac_ratio']:.1f}x
- **Payback**: {results['payback']:.1f}κ°μ
"""
else:
valuation_text += f"""
## π° Revenue-based Valuation
- **ARR**: ${results['arr']/1000000:.2f}M
- **Multiple**: {results['multiple']:.1f}x
- **LTV/CAC**: {results['ltv_cac_ratio']:.1f}x
- **Payback**: {results['payback']:.1f} months
"""
# μ¬λ¬΄ 건μ μ±
if language == "ko":
valuation_text += f"""
## π {t['financial_health']}
- **νκΈ λ°μ¨μ΄**: {results['runway']:.1f}κ°μ
- **μκ° λ²λ μ΄νΈ**: ${burn_rate}K
"""
else:
valuation_text += f"""
## π {t['financial_health']}
- **Cash Runway**: {results['runway']:.1f} months
- **Monthly Burn Rate**: ${burn_rate}K
"""
# LLM κΈ°λ° μ λ΅μ λΆμ μΆκ°
strategic_report = None
if api_key and api_key.strip():
strategic_report = calculator.generate_strategic_report(data, results, language, api_key)
if strategic_report:
if language == "ko":
valuation_text += f"""
## π€ AI μ λ΅μ λΆμ
{strategic_report}
"""
else:
valuation_text += f"""
## π€ AI Strategic Analysis
{strategic_report}
"""
# μ°¨νΈ μμ±
comparison_chart = calculator.create_valuation_comparison_chart(results, language)
scorecard_chart = calculator.create_scorecard_radar_chart(results['scorecard_adjustments'], language)
# μμΈ ν
μ΄λΈ
if language == "ko":
methods_df = pd.DataFrame({
"νκ° λ°©λ²": ["λ²ν¬μ€ λ°©λ²", "λ§€μΆ λ©ν°ν", "μ€μ½μ΄μΉ΄λ μ‘°μ ", "μ΅μ’
νκ°"],
"νκ°μ‘": [
f"${results['berkus_valuation']/1000000:.2f}M",
f"${results['base_valuation']/1000000:.2f}M" if results['valuation_method'] == 'revenue_multiple' else "N/A",
f"{results['scorecard_multiplier']:.2f}x",
f"${results['final_valuation']/1000000:.2f}M"
]
})
else:
methods_df = pd.DataFrame({
"Method": ["Berkus Method", "Revenue Multiple", "Scorecard Adjustment", "Final Valuation"],
"Value": [
f"${results['berkus_valuation']/1000000:.2f}M",
f"${results['base_valuation']/1000000:.2f}M" if results['valuation_method'] == 'revenue_multiple' else "N/A",
f"{results['scorecard_multiplier']:.2f}x",
f"${results['final_valuation']/1000000:.2f}M"
]
})
return valuation_text, comparison_chart, scorecard_chart, methods_df
# Gradio UI
with gr.Blocks(title="Startup Valuation Calculator", theme=gr.themes.Soft()) as demo:
gr.Markdown("""
# π¦ μ€ννΈμ
κ°μΉνκ° μλν μμ€ν
v3.5
### AI κΈ°λ° μ λ΅μ λΆμμ ν¬ν¨ν μ’
ν© νκ° μμ€ν
""")
# API ν€μ μΈμ΄ μ ν
with gr.Row():
api_key = gr.Textbox(
label="Fireworks API Key (μ νμ¬ν - AI λΆμμ©)",
placeholder="AI μ λ΅μ λΆμμ μνμλ©΄ API ν€λ₯Ό μ
λ ₯νμΈμ",
type="password"
)
language = gr.Radio(
choices=[("νκ΅μ΄", "ko"), ("English", "en")],
value="ko",
label="Language / μΈμ΄",
type="value"
)
with gr.Tab("κΈ°λ³Έ μ 보 / Basic Info"):
with gr.Row():
company_name = gr.Textbox(label="νμ¬λͺ
/ Company Name", value="μ°λ¦¬ μ€ννΈμ
")
founded_year = gr.Slider(2000, 2025, value=2022, step=1, label="μ€λ¦½μ°λ / Founded Year")
with gr.Row():
industry = gr.Dropdown(
choices=list(calculator.industry_multiples.keys()),
value="SaaS - B2B",
label="μ°μ
λΆλ₯ / Industry"
)
stage = gr.Radio(
choices=["MVP/λ² ν", "μ΄κΈ° λ§€μΆ", "μ±μ₯ λ¨κ³", "μμ΅μ± ν보"],
value="μ΄κΈ° λ§€μΆ",
label="μ¬μ
λ¨κ³ / Stage"
)
revenue_type = gr.Radio(
choices=["ꡬλ
ν (SaaS)", "κ±°λμμλ£ν", "μΌνμ± νλ§€"],
value="ꡬλ
ν (SaaS)",
label="μμ΅ λͺ¨λΈ / Revenue Model"
)
with gr.Tab("λ²ν¬μ€ νκ° / Berkus Method"):
gr.Markdown("### π‘ μμ΄λμ΄ κ²μ¦ / Idea Validation")
with gr.Row():
idea_validation = gr.Slider(0, 100, value=70, step=10,
label="μμ΄λμ΄ κ²μ¦ μμ€ / Idea Validation Level (%)")
market_research = gr.Slider(0, 10, value=5, step=1,
label="μμ₯ μ‘°μ¬ κΉμ΄ / Market Research Depth (1-10)")
gr.Markdown("### π§ νλ‘ν νμ
/ Prototype")
prototype_stage = gr.Radio(
choices=["μμ", "컨μ
/λͺ©μ
", "μλ νλ‘ν νμ
", "λ² ν λ²μ ", "μΆμ λ²μ "],
value="λ² ν λ²μ ",
label="νλ‘ν νμ
λ¨κ³ / Prototype Stage"
)
gr.Markdown("### π₯ ν μλ / Team Quality")
with gr.Row():
team_experience = gr.Slider(0, 30, value=5, step=1,
label="ν νκ· κ²½λ ₯(λ
) / Average Experience (years)")
domain_expertise = gr.Slider(0, 5, value=3, step=1,
label="λλ©μΈ μ λ¬Έμ± / Domain Expertise (1-5)")
startup_experience = gr.Slider(0, 5, value=2, step=1,
label="μ€ννΈμ
κ²½ν / Startup Experience (1-5)")
gr.Markdown("### π€ μ λ΅μ κ΄κ³ / Strategic Relationships")
with gr.Row():
partnerships = gr.Number(label="μ λ΅μ ννΈλμ μ / Strategic Partnerships", value=2)
advisors = gr.Number(label="κ³ λ¬Έ/λ©ν μ / Advisors/Mentors", value=3)
pilot_customers = gr.Number(label="νμΌλΏ κ³ κ° μ / Pilot Customers", value=5)
gr.Markdown("### π μ ν μΆμ / Product Rollout")
with gr.Row():
sales_started = gr.Checkbox(label="λ§€μΆ λ°μ μμ / Sales Started", value=True)
customer_validation = gr.Slider(0, 10, value=5, step=1,
label="κ³ κ° κ²μ¦ μμ€ / Customer Validation (1-10)")
launch_readiness = gr.Slider(0, 100, value=80, step=10,
label="μΆμ μ€λΉλ / Launch Readiness (%)")
with gr.Tab("μ€μ½μ΄μΉ΄λ νκ° / Scorecard"):
gr.Markdown("### κ° μμλ₯Ό λμΌ μ€ν
μ΄μ§ νκ· λλΉ νκ° (50 = νκ· )")
gr.Markdown("### Rate each factor compared to same-stage average (50 = average)")
team_strength = gr.Slider(0, 100, value=60, step=5,
label="ν μλ / Team Strength")
market_opportunity = gr.Slider(0, 100, value=70, step=5,
label="μμ₯ κΈ°ν / Market Opportunity")
product_stage = gr.Slider(0, 100, value=65, step=5,
label="μ ν μμ±λ / Product Maturity")
competitive_advantage = gr.Slider(0, 100, value=55, step=5,
label="κ²½μ μ°μ / Competitive Advantage")
marketing_channels = gr.Slider(0, 100, value=50, step=5,
label="λ§μΌν
/νλ§€ / Marketing & Sales")
funding_efficiency = gr.Slider(0, 100, value=60, step=5,
label="μκΈ ν¨μ¨μ± / Funding Efficiency")
other_factors = gr.Slider(0, 100, value=50, step=5,
label="κΈ°ν μμ / Other Factors")
with gr.Tab("λ§€μΆ μ 보 / Revenue (Optional)"):
gr.Markdown("### π° λ§€μΆμ΄ μλ κ²½μ°λ§ μ
λ ₯ / Only if you have revenue")
with gr.Row():
monthly_revenue = gr.Number(label="μ λ§€μΆ / Monthly Revenue ($K)", value=0)
growth_rate = gr.Slider(0, 300, value=0, step=10,
label="μ°κ° μ±μ₯λ₯ / Annual Growth Rate (%)")
with gr.Row():
arpu = gr.Number(label="ARPU ($)", value=0)
gross_margin = gr.Slider(0, 100, value=0, step=5,
label="λ§€μΆμ΄μ΄μ΅λ₯ / Gross Margin (%)")
with gr.Row():
retention_rate = gr.Slider(0, 100, value=0, step=5,
label="κ³ κ° μ μ§μ¨ / Retention Rate (%)")
monthly_churn = gr.Slider(0, 20, value=0, step=0.5,
label="μ μ΄νλ₯ / Monthly Churn (%)")
with gr.Row():
new_customers = gr.Number(label="μ μ κ· κ³ κ° / New Customers/Month", value=0)
monthly_marketing = gr.Number(label="μ λ§μΌν
λΉμ© / Marketing Cost ($K)", value=0)
monthly_sales = gr.Number(label="μ μμ
λΉμ© / Sales Cost ($K)", value=0)
with gr.Tab("μ¬λ¬΄ νν© / Financials"):
gr.Markdown("### πΈ νκΈ μν© / Cash Position ($K)")
with gr.Row():
cash_balance = gr.Number(label="νκΈ μκ³ / Cash Balance ($K)", value=1000)
burn_rate = gr.Number(label="μ λ²λ μ΄νΈ / Monthly Burn Rate ($K)", value=80)
# νκ° μ€ν λ²νΌ
evaluate_btn = gr.Button("π κ°μΉνκ° μ€ν / Run Valuation", variant="primary", size="lg")
# κ²°κ³Ό μΆλ ₯
with gr.Row():
with gr.Column(scale=2):
valuation_output = gr.Markdown(label="νκ° κ²°κ³Ό / Results")
with gr.Column(scale=1):
methods_table = gr.DataFrame(label="νκ° λ°©λ² λΉκ΅ / Method Comparison")
with gr.Row():
comparison_chart = gr.Plot(label="νκ° λ°©λ² λΉκ΅ / Valuation Comparison")
scorecard_chart = gr.Plot(label="μ€μ½μ΄μΉ΄λ λΆμ / Scorecard Analysis")
# μ΄λ²€νΈ μ°κ²°
evaluate_btn.click(
process_valuation,
inputs=[
api_key, language,
company_name, founded_year, industry, stage, revenue_type,
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
retention_rate, new_customers, monthly_marketing, monthly_sales,
cash_balance, burn_rate,
idea_validation, market_research, prototype_stage, team_experience,
domain_expertise, startup_experience, partnerships, advisors,
pilot_customers, sales_started, customer_validation, launch_readiness,
team_strength, market_opportunity, product_stage, competitive_advantage,
marketing_channels, funding_efficiency, other_factors
],
outputs=[valuation_output, comparison_chart, scorecard_chart, methods_table]
)
# μμ λ°μ΄ν°
gr.Markdown("### π μμ λ°μ΄ν° / Example Data")
with gr.Row():
gr.Button("μ΄κΈ° μ€ννΈμ
/ Early Startup").click(
lambda: [
"", "ko", "ν
ν¬ μ€ννΈμ
", 2023, "AI/λ₯ν
ν¬", "MVP/λ² ν", "ꡬλ
ν (SaaS)",
0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 50,
80, 7, "λ² ν λ²μ ", 3, 4, 1, 1, 2, 3, False, 0, 70,
70, 65, 55, 60, 45, 50, 50
],
outputs=[
api_key, language, company_name, founded_year, industry, stage, revenue_type,
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
retention_rate, new_customers, monthly_marketing, monthly_sales,
cash_balance, burn_rate,
idea_validation, market_research, prototype_stage, team_experience,
domain_expertise, startup_experience, partnerships, advisors,
pilot_customers, sales_started, customer_validation, launch_readiness,
team_strength, market_opportunity, product_stage, competitive_advantage,
marketing_channels, funding_efficiency, other_factors
]
)
gr.Button("μ±μ₯ λ¨κ³ / Growth Stage").click(
lambda: [
"", "en", "SaaS Corp", 2021, "SaaS - B2B", "μ±μ₯ λ¨κ³", "ꡬλ
ν (SaaS)",
100, 150, 200, 75, 2, 90, 40, 30, 20, 2000, 120,
90, 9, "μΆμ λ²μ ", 8, 5, 3, 5, 5, 20, True, 8, 95,
85, 80, 75, 70, 65, 75, 60
],
outputs=[
api_key, language, company_name, founded_year, industry, stage, revenue_type,
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
retention_rate, new_customers, monthly_marketing, monthly_sales,
cash_balance, burn_rate,
idea_validation, market_research, prototype_stage, team_experience,
domain_expertise, startup_experience, partnerships, advisors,
pilot_customers, sales_started, customer_validation, launch_readiness,
team_strength, market_opportunity, product_stage, competitive_advantage,
marketing_channels, funding_efficiency, other_factors
]
)
return demo
# μ€ν
if __name__ == "__main__":
demo = create_ui()
demo.launch(share=True) |