Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,8 @@ import pandas as pd
|
|
| 3 |
import numpy as np
|
| 4 |
from datetime import datetime
|
| 5 |
import plotly.graph_objects as go
|
|
|
|
|
|
|
| 6 |
|
| 7 |
class StartupValuationCalculator:
|
| 8 |
def __init__(self):
|
|
@@ -34,20 +36,31 @@ class StartupValuationCalculator:
|
|
| 34 |
"retention": 0.2,
|
| 35 |
"payback": 0.2
|
| 36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
def calculate_arr(self, monthly_revenue, revenue_type):
|
| 39 |
"""μ λ§€μΆμ μ°κ° λ°λ³΅ λ§€μΆ(ARR)λ‘ λ³ν"""
|
| 40 |
if revenue_type == "ꡬλ
ν (SaaS)":
|
| 41 |
return monthly_revenue * 12
|
| 42 |
elif revenue_type == "κ±°λμμλ£ν":
|
| 43 |
-
return monthly_revenue * 12 * 0.8
|
| 44 |
else:
|
| 45 |
-
return monthly_revenue * 12 * 0.6
|
| 46 |
|
| 47 |
def calculate_ltv(self, arpu, gross_margin, monthly_churn):
|
| 48 |
"""LTV κ³μ°"""
|
| 49 |
if monthly_churn == 0:
|
| 50 |
-
monthly_churn = 0.01
|
| 51 |
return arpu * (gross_margin / 100) / monthly_churn
|
| 52 |
|
| 53 |
def calculate_cac(self, monthly_marketing, monthly_sales, new_customers):
|
|
@@ -74,6 +87,118 @@ class StartupValuationCalculator:
|
|
| 74 |
total_score = sum(scores[key] * self.unit_economics_weights[key] for key in scores)
|
| 75 |
return total_score
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
def get_growth_category(self, growth_rate):
|
| 78 |
"""μ±μ₯λ₯ μΉ΄ν
κ³ λ¦¬ κ²°μ """
|
| 79 |
if growth_rate < 20:
|
|
@@ -87,7 +212,7 @@ class StartupValuationCalculator:
|
|
| 87 |
else:
|
| 88 |
return "200%+"
|
| 89 |
|
| 90 |
-
def calculate_valuation(self, data):
|
| 91 |
"""μ’
ν© κ°μΉνκ° κ³μ°"""
|
| 92 |
# ARR κ³μ°
|
| 93 |
arr = self.calculate_arr(data["monthly_revenue"], data["revenue_type"])
|
|
@@ -103,11 +228,17 @@ class StartupValuationCalculator:
|
|
| 103 |
ltv_cac_ratio, data["gross_margin"], data["retention_rate"], payback
|
| 104 |
)
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
# κΈ°λ³Έ λ©ν°ν μ ν
|
| 107 |
multiples = self.industry_multiples[data["industry"]]
|
| 108 |
-
if
|
| 109 |
base_multiple = multiples["high"]
|
| 110 |
-
elif
|
| 111 |
base_multiple = multiples["mid"]
|
| 112 |
else:
|
| 113 |
base_multiple = multiples["low"]
|
|
@@ -123,7 +254,11 @@ class StartupValuationCalculator:
|
|
| 123 |
"μ±μ₯ λ¨κ³": 1.0,
|
| 124 |
"μμ΅μ± ν보": 1.2
|
| 125 |
}
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
# μ΅μ’
κ°μΉνκ°
|
| 129 |
valuation = arr * final_multiple
|
|
@@ -140,6 +275,9 @@ class StartupValuationCalculator:
|
|
| 140 |
"ltv_cac_ratio": ltv_cac_ratio,
|
| 141 |
"payback": payback,
|
| 142 |
"ue_score": ue_score,
|
|
|
|
|
|
|
|
|
|
| 143 |
"runway": runway
|
| 144 |
}
|
| 145 |
|
|
@@ -172,6 +310,33 @@ class StartupValuationCalculator:
|
|
| 172 |
)
|
| 173 |
|
| 174 |
return fig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
def create_ui():
|
| 177 |
calculator = StartupValuationCalculator()
|
|
@@ -180,11 +345,16 @@ def create_ui():
|
|
| 180 |
company_name, founded_year, industry, stage, revenue_type,
|
| 181 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 182 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 183 |
-
cash_balance, burn_rate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
):
|
| 185 |
# μ
λ ₯κ° κ²μ¦
|
| 186 |
if monthly_revenue <= 0:
|
| 187 |
-
return "μ λ§€μΆμ μ
λ ₯ν΄μ£ΌμΈμ.", None, None
|
| 188 |
|
| 189 |
# λ°μ΄ν° μ€λΉ
|
| 190 |
data = {
|
|
@@ -193,7 +363,7 @@ def create_ui():
|
|
| 193 |
"industry": industry,
|
| 194 |
"stage": stage,
|
| 195 |
"revenue_type": revenue_type,
|
| 196 |
-
"monthly_revenue": monthly_revenue * 1000,
|
| 197 |
"growth_rate": growth_rate,
|
| 198 |
"arpu": arpu,
|
| 199 |
"gross_margin": gross_margin,
|
|
@@ -206,8 +376,27 @@ def create_ui():
|
|
| 206 |
"burn_rate": burn_rate * 1000
|
| 207 |
}
|
| 208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
# κ°μΉνκ° κ³μ°
|
| 210 |
-
results = calculator.calculate_valuation(data)
|
| 211 |
|
| 212 |
# κ²°κ³Ό ν¬λ§·ν
|
| 213 |
valuation_text = f"""
|
|
@@ -225,6 +414,19 @@ def create_ui():
|
|
| 225 |
- **Payback Period**: {results['payback']:.1f}κ°μ
|
| 226 |
- **λ¨μκ²½μ μ μ**: {results['ue_score']:.0f}/100
|
| 227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
## π μ¬λ¬΄ 건μ μ±
|
| 229 |
- **νκΈ λ°μ¨μ΄**: {results['runway']:.1f}κ°μ
|
| 230 |
- **μκ° λ²λ μ΄νΈ**: ${burn_rate}K
|
|
@@ -243,27 +445,34 @@ def create_ui():
|
|
| 243 |
if gross_margin < 60:
|
| 244 |
valuation_text += "- π λ§€μΆμ΄μ΄μ΅λ₯ κ°μ μ¬μ§κ° μμ΅λλ€. (μ
κ³ νκ· : 70-80%)\n"
|
| 245 |
|
|
|
|
|
|
|
|
|
|
| 246 |
# λΉκ΅ μ°¨νΈ μμ±
|
| 247 |
comparison_chart = calculator.create_comparison_chart(
|
| 248 |
results['valuation'], industry, results['arr']
|
| 249 |
)
|
| 250 |
|
|
|
|
|
|
|
|
|
|
| 251 |
# μμΈ λΆμ ν
μ΄λΈ
|
| 252 |
metrics_df = pd.DataFrame({
|
| 253 |
-
"μ§ν": ["μ λ§€μΆ", "μ° μ±μ₯λ₯ ", "λ§€μΆμ΄μ΄μ΅λ₯ ", "μ μ΄νλ₯ ", "κ³ κ° μ μ§μ¨"],
|
| 254 |
"νμ¬ κ°": [f"${monthly_revenue}K", f"{growth_rate}%", f"{gross_margin}%",
|
| 255 |
-
f"{monthly_churn}%", f"{retention_rate}%"],
|
| 256 |
-
"μ
κ³ νκ· ": ["N/A", "50-100%", "70-80%", "2-5%", "80-90%"]
|
| 257 |
})
|
| 258 |
|
| 259 |
-
return valuation_text, comparison_chart, metrics_df
|
| 260 |
|
| 261 |
# Gradio UI
|
| 262 |
with gr.Blocks(title="μ€ννΈμ
κ°μΉνκ° κ³μ°κΈ°", theme=gr.themes.Soft()) as demo:
|
| 263 |
gr.Markdown("""
|
| 264 |
-
# π¦ μ€ννΈμ
κ°μΉνκ° μλν μμ€ν
|
| 265 |
|
| 266 |
κ°λ¨ν μ 보 μ
λ ₯λ§μΌλ‘ κ·μ¬μ μμ κΈ°μ
κ°μΉλ₯Ό μ°μΆνκ³ λμ’
μ
κ³μ λΉκ΅ν΄λ립λλ€.
|
|
|
|
| 267 |
""")
|
| 268 |
|
| 269 |
with gr.Tab("κΈ°λ³Έ μ 보"):
|
|
@@ -315,6 +524,53 @@ def create_ui():
|
|
| 315 |
monthly_marketing = gr.Number(label="μ λ§μΌν
λΉμ© ($K)", value=20)
|
| 316 |
monthly_sales = gr.Number(label="μ μμ
λΉμ© ($K)", value=15)
|
| 317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 318 |
with gr.Tab("μ¬λ¬΄ νν©"):
|
| 319 |
gr.Markdown("### πΈ νκΈ μν© (λ¨μ: μ² λ¬λ¬)")
|
| 320 |
with gr.Row():
|
|
@@ -331,7 +587,9 @@ def create_ui():
|
|
| 331 |
with gr.Column(scale=1):
|
| 332 |
metrics_table = gr.DataFrame(label="μ£Όμ μ§ν λΉκ΅")
|
| 333 |
|
| 334 |
-
|
|
|
|
|
|
|
| 335 |
|
| 336 |
# μ΄λ²€νΈ μ°κ²°
|
| 337 |
evaluate_btn.click(
|
|
@@ -340,41 +598,63 @@ def create_ui():
|
|
| 340 |
company_name, founded_year, industry, stage, revenue_type,
|
| 341 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 342 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 343 |
-
cash_balance, burn_rate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
],
|
| 345 |
-
outputs=[valuation_output, comparison_chart, metrics_table]
|
| 346 |
)
|
| 347 |
|
| 348 |
# μμ λ°μ΄ν° λ²νΌλ€
|
| 349 |
gr.Markdown("### π μμ λ°μ΄ν°λ‘ ν
μ€νΈνκΈ°")
|
| 350 |
with gr.Row():
|
| 351 |
-
gr.Button("
|
| 352 |
lambda: [
|
| 353 |
-
"
|
| 354 |
100, 150, 200, 75, 2,
|
| 355 |
90, 40, 30, 20,
|
| 356 |
-
2000, 120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 357 |
],
|
| 358 |
outputs=[
|
| 359 |
company_name, founded_year, industry, stage, revenue_type,
|
| 360 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 361 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 362 |
-
cash_balance, burn_rate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 363 |
]
|
| 364 |
)
|
| 365 |
|
| 366 |
-
gr.Button("
|
| 367 |
lambda: [
|
| 368 |
-
"
|
| 369 |
-
80,
|
| 370 |
-
|
| 371 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
],
|
| 373 |
outputs=[
|
| 374 |
company_name, founded_year, industry, stage, revenue_type,
|
| 375 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 376 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 377 |
-
cash_balance, burn_rate
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
]
|
| 379 |
)
|
| 380 |
|
|
|
|
| 3 |
import numpy as np
|
| 4 |
from datetime import datetime
|
| 5 |
import plotly.graph_objects as go
|
| 6 |
+
import re
|
| 7 |
+
from urllib.parse import urlparse
|
| 8 |
|
| 9 |
class StartupValuationCalculator:
|
| 10 |
def __init__(self):
|
|
|
|
| 36 |
"retention": 0.2,
|
| 37 |
"payback": 0.2
|
| 38 |
}
|
| 39 |
+
|
| 40 |
+
# IP μμ° κ°μΉ κ°μ€μΉ
|
| 41 |
+
self.ip_asset_weights = {
|
| 42 |
+
"patents": 0.25,
|
| 43 |
+
"papers": 0.15,
|
| 44 |
+
"domains": 0.15,
|
| 45 |
+
"trademarks": 0.10,
|
| 46 |
+
"github": 0.10,
|
| 47 |
+
"awards": 0.10,
|
| 48 |
+
"team": 0.15
|
| 49 |
+
}
|
| 50 |
|
| 51 |
def calculate_arr(self, monthly_revenue, revenue_type):
|
| 52 |
"""μ λ§€μΆμ μ°κ° λ°λ³΅ λ§€μΆ(ARR)λ‘ λ³ν"""
|
| 53 |
if revenue_type == "ꡬλ
ν (SaaS)":
|
| 54 |
return monthly_revenue * 12
|
| 55 |
elif revenue_type == "κ±°λμμλ£ν":
|
| 56 |
+
return monthly_revenue * 12 * 0.8
|
| 57 |
else:
|
| 58 |
+
return monthly_revenue * 12 * 0.6
|
| 59 |
|
| 60 |
def calculate_ltv(self, arpu, gross_margin, monthly_churn):
|
| 61 |
"""LTV κ³μ°"""
|
| 62 |
if monthly_churn == 0:
|
| 63 |
+
monthly_churn = 0.01
|
| 64 |
return arpu * (gross_margin / 100) / monthly_churn
|
| 65 |
|
| 66 |
def calculate_cac(self, monthly_marketing, monthly_sales, new_customers):
|
|
|
|
| 87 |
total_score = sum(scores[key] * self.unit_economics_weights[key] for key in scores)
|
| 88 |
return total_score
|
| 89 |
|
| 90 |
+
def evaluate_domain(self, domains):
|
| 91 |
+
"""λλ©μΈ κ°μΉ νκ°"""
|
| 92 |
+
if not domains:
|
| 93 |
+
return 0
|
| 94 |
+
|
| 95 |
+
domain_list = [d.strip() for d in domains.split(',') if d.strip()]
|
| 96 |
+
score = 0
|
| 97 |
+
|
| 98 |
+
for domain in domain_list:
|
| 99 |
+
parsed = urlparse(domain if domain.startswith('http') else f'http://{domain}')
|
| 100 |
+
domain_name = parsed.netloc or parsed.path
|
| 101 |
+
|
| 102 |
+
# .com λλ©μΈ κ°μ°μ
|
| 103 |
+
if domain_name.endswith('.com'):
|
| 104 |
+
score += 30
|
| 105 |
+
elif domain_name.endswith(('.io', '.ai', '.tech')):
|
| 106 |
+
score += 20
|
| 107 |
+
else:
|
| 108 |
+
score += 10
|
| 109 |
+
|
| 110 |
+
# μ§§μ λλ©μΈ κ°μ°μ
|
| 111 |
+
name_length = len(domain_name.split('.')[0])
|
| 112 |
+
if name_length <= 5:
|
| 113 |
+
score += 20
|
| 114 |
+
elif name_length <= 8:
|
| 115 |
+
score += 10
|
| 116 |
+
|
| 117 |
+
return min(100, score / len(domain_list))
|
| 118 |
+
|
| 119 |
+
def evaluate_patents(self, patent_filed, patent_granted):
|
| 120 |
+
"""νΉν κ°μΉ νκ°"""
|
| 121 |
+
score = 0
|
| 122 |
+
score += patent_filed * 15 # μΆμ νΉνλΉ 15μ
|
| 123 |
+
score += patent_granted * 30 # λ±λ‘ νΉνλΉ 30μ
|
| 124 |
+
return min(100, score)
|
| 125 |
+
|
| 126 |
+
def evaluate_papers(self, papers):
|
| 127 |
+
"""λ
Όλ¬Έ κ°μΉ νκ°"""
|
| 128 |
+
if not papers:
|
| 129 |
+
return 0
|
| 130 |
+
|
| 131 |
+
paper_count = len([p.strip() for p in papers.split('\n') if p.strip()])
|
| 132 |
+
score = paper_count * 20 # λ
Όλ¬ΈλΉ 20μ
|
| 133 |
+
|
| 134 |
+
# μ£Όμ νν/μ λ ν€μλ 체ν¬
|
| 135 |
+
prestigious_keywords = ['Nature', 'Science', 'IEEE', 'ACM', 'CVPR', 'NeurIPS', 'ICML']
|
| 136 |
+
for keyword in prestigious_keywords:
|
| 137 |
+
if keyword.lower() in papers.lower():
|
| 138 |
+
score += 10
|
| 139 |
+
|
| 140 |
+
return min(100, score)
|
| 141 |
+
|
| 142 |
+
def evaluate_github(self, github_url, github_stars):
|
| 143 |
+
"""GitHub μ μ₯μ νκ°"""
|
| 144 |
+
if not github_url:
|
| 145 |
+
return 0
|
| 146 |
+
|
| 147 |
+
score = 0
|
| 148 |
+
if github_stars >= 1000:
|
| 149 |
+
score = 80
|
| 150 |
+
elif github_stars >= 500:
|
| 151 |
+
score = 60
|
| 152 |
+
elif github_stars >= 100:
|
| 153 |
+
score = 40
|
| 154 |
+
elif github_stars >= 50:
|
| 155 |
+
score = 20
|
| 156 |
+
else:
|
| 157 |
+
score = 10
|
| 158 |
+
|
| 159 |
+
return score
|
| 160 |
+
|
| 161 |
+
def evaluate_team(self, team_size, phd_count, serial_entrepreneurs, big_tech_experience):
|
| 162 |
+
"""ν μλ νκ°"""
|
| 163 |
+
score = 0
|
| 164 |
+
|
| 165 |
+
# ν κ·λͺ¨
|
| 166 |
+
if team_size >= 20:
|
| 167 |
+
score += 20
|
| 168 |
+
elif team_size >= 10:
|
| 169 |
+
score += 15
|
| 170 |
+
elif team_size >= 5:
|
| 171 |
+
score += 10
|
| 172 |
+
|
| 173 |
+
# λ°μ¬ νμ
|
| 174 |
+
score += min(30, phd_count * 10)
|
| 175 |
+
|
| 176 |
+
# μ°μμ°½μ
κ°
|
| 177 |
+
score += min(30, serial_entrepreneurs * 15)
|
| 178 |
+
|
| 179 |
+
# λΉ
ν
ν¬ κ²½ν
|
| 180 |
+
score += min(20, big_tech_experience * 5)
|
| 181 |
+
|
| 182 |
+
return min(100, score)
|
| 183 |
+
|
| 184 |
+
def calculate_ip_score(self, ip_data):
|
| 185 |
+
"""μ§μ μ¬μ° μ’
ν© μ μ κ³μ°"""
|
| 186 |
+
scores = {
|
| 187 |
+
"patents": self.evaluate_patents(ip_data["patent_filed"], ip_data["patent_granted"]),
|
| 188 |
+
"papers": self.evaluate_papers(ip_data["papers"]),
|
| 189 |
+
"domains": self.evaluate_domain(ip_data["domains"]),
|
| 190 |
+
"trademarks": min(100, ip_data["trademarks"] * 20),
|
| 191 |
+
"github": self.evaluate_github(ip_data["github_url"], ip_data["github_stars"]),
|
| 192 |
+
"awards": min(100, ip_data["awards"] * 25),
|
| 193 |
+
"team": self.evaluate_team(
|
| 194 |
+
ip_data["team_size"], ip_data["phd_count"],
|
| 195 |
+
ip_data["serial_entrepreneurs"], ip_data["big_tech_experience"]
|
| 196 |
+
)
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
total_score = sum(scores[key] * self.ip_asset_weights[key] for key in scores)
|
| 200 |
+
return total_score, scores
|
| 201 |
+
|
| 202 |
def get_growth_category(self, growth_rate):
|
| 203 |
"""μ±μ₯λ₯ μΉ΄ν
κ³ λ¦¬ κ²°μ """
|
| 204 |
if growth_rate < 20:
|
|
|
|
| 212 |
else:
|
| 213 |
return "200%+"
|
| 214 |
|
| 215 |
+
def calculate_valuation(self, data, ip_data):
|
| 216 |
"""μ’
ν© κ°μΉνκ° κ³μ°"""
|
| 217 |
# ARR κ³μ°
|
| 218 |
arr = self.calculate_arr(data["monthly_revenue"], data["revenue_type"])
|
|
|
|
| 228 |
ltv_cac_ratio, data["gross_margin"], data["retention_rate"], payback
|
| 229 |
)
|
| 230 |
|
| 231 |
+
# IP μμ° μ μ
|
| 232 |
+
ip_score, ip_breakdown = self.calculate_ip_score(ip_data)
|
| 233 |
+
|
| 234 |
+
# μ’
ν© μ μ (λ¨μκ²½μ 60%, IP 40%)
|
| 235 |
+
combined_score = ue_score * 0.6 + ip_score * 0.4
|
| 236 |
+
|
| 237 |
# κΈ°λ³Έ λ©ν°ν μ ν
|
| 238 |
multiples = self.industry_multiples[data["industry"]]
|
| 239 |
+
if combined_score >= 80:
|
| 240 |
base_multiple = multiples["high"]
|
| 241 |
+
elif combined_score >= 50:
|
| 242 |
base_multiple = multiples["mid"]
|
| 243 |
else:
|
| 244 |
base_multiple = multiples["low"]
|
|
|
|
| 254 |
"μ±μ₯ λ¨κ³": 1.0,
|
| 255 |
"μμ΅μ± ν보": 1.2
|
| 256 |
}
|
| 257 |
+
|
| 258 |
+
# IP μμ° ν리미μ (μ΅λ 20%)
|
| 259 |
+
ip_premium = 1 + (ip_score / 100 * 0.2)
|
| 260 |
+
|
| 261 |
+
final_multiple = adjusted_multiple * stage_adj[data["stage"]] * ip_premium
|
| 262 |
|
| 263 |
# μ΅μ’
κ°μΉνκ°
|
| 264 |
valuation = arr * final_multiple
|
|
|
|
| 275 |
"ltv_cac_ratio": ltv_cac_ratio,
|
| 276 |
"payback": payback,
|
| 277 |
"ue_score": ue_score,
|
| 278 |
+
"ip_score": ip_score,
|
| 279 |
+
"ip_breakdown": ip_breakdown,
|
| 280 |
+
"combined_score": combined_score,
|
| 281 |
"runway": runway
|
| 282 |
}
|
| 283 |
|
|
|
|
| 310 |
)
|
| 311 |
|
| 312 |
return fig
|
| 313 |
+
|
| 314 |
+
def create_ip_breakdown_chart(self, ip_breakdown):
|
| 315 |
+
"""IP μμ° λΆμ μ°¨νΈ"""
|
| 316 |
+
categories = list(ip_breakdown.keys())
|
| 317 |
+
values = list(ip_breakdown.values())
|
| 318 |
+
|
| 319 |
+
fig = go.Figure(data=[
|
| 320 |
+
go.Radar(
|
| 321 |
+
r=values,
|
| 322 |
+
theta=categories,
|
| 323 |
+
fill='toself',
|
| 324 |
+
name='IP μμ° μ μ'
|
| 325 |
+
)
|
| 326 |
+
])
|
| 327 |
+
|
| 328 |
+
fig.update_layout(
|
| 329 |
+
polar=dict(
|
| 330 |
+
radialaxis=dict(
|
| 331 |
+
visible=True,
|
| 332 |
+
range=[0, 100]
|
| 333 |
+
)
|
| 334 |
+
),
|
| 335 |
+
showlegend=False,
|
| 336 |
+
title="μ§μ μ¬μ° μμ° λΆμ"
|
| 337 |
+
)
|
| 338 |
+
|
| 339 |
+
return fig
|
| 340 |
|
| 341 |
def create_ui():
|
| 342 |
calculator = StartupValuationCalculator()
|
|
|
|
| 345 |
company_name, founded_year, industry, stage, revenue_type,
|
| 346 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 347 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 348 |
+
cash_balance, burn_rate,
|
| 349 |
+
# IP κ΄λ ¨ μ
λ ₯
|
| 350 |
+
domains, patent_filed, patent_granted, papers, trademarks,
|
| 351 |
+
github_url, github_stars, awards, partnerships,
|
| 352 |
+
team_size, phd_count, serial_entrepreneurs, big_tech_experience,
|
| 353 |
+
media_coverage, app_downloads, social_followers
|
| 354 |
):
|
| 355 |
# μ
λ ₯κ° κ²μ¦
|
| 356 |
if monthly_revenue <= 0:
|
| 357 |
+
return "μ λ§€μΆμ μ
λ ₯ν΄μ£ΌμΈμ.", None, None, None
|
| 358 |
|
| 359 |
# λ°μ΄ν° μ€λΉ
|
| 360 |
data = {
|
|
|
|
| 363 |
"industry": industry,
|
| 364 |
"stage": stage,
|
| 365 |
"revenue_type": revenue_type,
|
| 366 |
+
"monthly_revenue": monthly_revenue * 1000,
|
| 367 |
"growth_rate": growth_rate,
|
| 368 |
"arpu": arpu,
|
| 369 |
"gross_margin": gross_margin,
|
|
|
|
| 376 |
"burn_rate": burn_rate * 1000
|
| 377 |
}
|
| 378 |
|
| 379 |
+
ip_data = {
|
| 380 |
+
"domains": domains,
|
| 381 |
+
"patent_filed": patent_filed,
|
| 382 |
+
"patent_granted": patent_granted,
|
| 383 |
+
"papers": papers,
|
| 384 |
+
"trademarks": trademarks,
|
| 385 |
+
"github_url": github_url,
|
| 386 |
+
"github_stars": github_stars,
|
| 387 |
+
"awards": awards,
|
| 388 |
+
"partnerships": partnerships,
|
| 389 |
+
"team_size": team_size,
|
| 390 |
+
"phd_count": phd_count,
|
| 391 |
+
"serial_entrepreneurs": serial_entrepreneurs,
|
| 392 |
+
"big_tech_experience": big_tech_experience,
|
| 393 |
+
"media_coverage": media_coverage,
|
| 394 |
+
"app_downloads": app_downloads,
|
| 395 |
+
"social_followers": social_followers
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
# κ°μΉνκ° κ³μ°
|
| 399 |
+
results = calculator.calculate_valuation(data, ip_data)
|
| 400 |
|
| 401 |
# κ²°κ³Ό ν¬λ§·ν
|
| 402 |
valuation_text = f"""
|
|
|
|
| 414 |
- **Payback Period**: {results['payback']:.1f}κ°μ
|
| 415 |
- **λ¨μκ²½μ μ μ**: {results['ue_score']:.0f}/100
|
| 416 |
|
| 417 |
+
## π― μ§μ μ¬μ° λ° λ¬΄νμμ°
|
| 418 |
+
- **IP μμ° μ μ**: {results['ip_score']:.0f}/100
|
| 419 |
+
- **μ’
ν© μ μ**: {results['combined_score']:.0f}/100
|
| 420 |
+
|
| 421 |
+
### IP μμ° μΈλΆ νκ°:
|
| 422 |
+
- νΉν: {results['ip_breakdown']['patents']:.0f}/100
|
| 423 |
+
- λ
Όλ¬Έ: {results['ip_breakdown']['papers']:.0f}/100
|
| 424 |
+
- λλ©μΈ: {results['ip_breakdown']['domains']:.0f}/100
|
| 425 |
+
- μνκΆ: {results['ip_breakdown']['trademarks']:.0f}/100
|
| 426 |
+
- μ€νμμ€: {results['ip_breakdown']['github']:.0f}/100
|
| 427 |
+
- μμμ€μ : {results['ip_breakdown']['awards']:.0f}/100
|
| 428 |
+
- ν μλ: {results['ip_breakdown']['team']:.0f}/100
|
| 429 |
+
|
| 430 |
## π μ¬λ¬΄ 건μ μ±
|
| 431 |
- **νκΈ λ°μ¨μ΄**: {results['runway']:.1f}κ°μ
|
| 432 |
- **μκ° λ²λ μ΄νΈ**: ${burn_rate}K
|
|
|
|
| 445 |
if gross_margin < 60:
|
| 446 |
valuation_text += "- π λ§€μΆμ΄μ΄μ΅λ₯ κ°μ μ¬μ§κ° μμ΅λλ€. (μ
κ³ νκ· : 70-80%)\n"
|
| 447 |
|
| 448 |
+
if results['ip_score'] > 70:
|
| 449 |
+
valuation_text += "- π κ°λ ₯ν IP ν¬νΈν΄λ¦¬μ€λ₯Ό 보μ νκ³ μμ΄ κ°μΉνκ°μ ν리미μμ΄ μ μ©λμμ΅λλ€.\n"
|
| 450 |
+
|
| 451 |
# λΉκ΅ μ°¨νΈ μμ±
|
| 452 |
comparison_chart = calculator.create_comparison_chart(
|
| 453 |
results['valuation'], industry, results['arr']
|
| 454 |
)
|
| 455 |
|
| 456 |
+
# IP λΆμ μ°¨νΈ
|
| 457 |
+
ip_chart = calculator.create_ip_breakdown_chart(results['ip_breakdown'])
|
| 458 |
+
|
| 459 |
# μμΈ λΆμ ν
μ΄λΈ
|
| 460 |
metrics_df = pd.DataFrame({
|
| 461 |
+
"μ§ν": ["μ λ§€μΆ", "μ° μ±μ₯λ₯ ", "λ§€μΆμ΄μ΄μ΅λ₯ ", "μ μ΄νλ₯ ", "κ³ κ° μ μ§μ¨", "IP μμ° μ μ"],
|
| 462 |
"νμ¬ κ°": [f"${monthly_revenue}K", f"{growth_rate}%", f"{gross_margin}%",
|
| 463 |
+
f"{monthly_churn}%", f"{retention_rate}%", f"{results['ip_score']:.0f}/100"],
|
| 464 |
+
"μ
κ³ νκ· ": ["N/A", "50-100%", "70-80%", "2-5%", "80-90%", "50/100"]
|
| 465 |
})
|
| 466 |
|
| 467 |
+
return valuation_text, comparison_chart, ip_chart, metrics_df
|
| 468 |
|
| 469 |
# Gradio UI
|
| 470 |
with gr.Blocks(title="μ€ννΈμ
κ°μΉνκ° κ³μ°κΈ°", theme=gr.themes.Soft()) as demo:
|
| 471 |
gr.Markdown("""
|
| 472 |
+
# π¦ μ€ννΈμ
κ°μΉνκ° μλν μμ€ν
v2.0
|
| 473 |
|
| 474 |
κ°λ¨ν μ 보 μ
λ ₯λ§μΌλ‘ κ·μ¬μ μμ κΈ°μ
κ°μΉλ₯Ό μ°μΆνκ³ λμ’
μ
κ³μ λΉκ΅ν΄λ립λλ€.
|
| 475 |
+
μ΄μ μ§μ μ¬μ°κ³Ό 무νμμ°κΉμ§ μ’
ν©μ μΌλ‘ νκ°ν©λλ€.
|
| 476 |
""")
|
| 477 |
|
| 478 |
with gr.Tab("κΈ°λ³Έ μ 보"):
|
|
|
|
| 524 |
monthly_marketing = gr.Number(label="μ λ§μΌν
λΉμ© ($K)", value=20)
|
| 525 |
monthly_sales = gr.Number(label="μ μμ
λΉμ© ($K)", value=15)
|
| 526 |
|
| 527 |
+
with gr.Tab("μ§μ μ¬μ° λ° κΈ°μ "):
|
| 528 |
+
gr.Markdown("### π νΉν λ° λ
Όλ¬Έ")
|
| 529 |
+
with gr.Row():
|
| 530 |
+
patent_filed = gr.Number(label="μΆμ νΉν μ", value=2)
|
| 531 |
+
patent_granted = gr.Number(label="λ±λ‘ νΉν μ", value=1)
|
| 532 |
+
trademarks = gr.Number(label="μνκΆ μ", value=1)
|
| 533 |
+
|
| 534 |
+
papers = gr.Textbox(
|
| 535 |
+
label="λ°ν λ
Όλ¬Έ (ν μ€μ νλμ©, URL ν¬ν¨ κ°λ₯)",
|
| 536 |
+
lines=3,
|
| 537 |
+
placeholder="μ: https://arxiv.org/abs/2301.12345 - AI Model Optimization\nICML 2023 - Novel Approach to Machine Learning"
|
| 538 |
+
)
|
| 539 |
+
|
| 540 |
+
gr.Markdown("### π λμ§νΈ μμ°")
|
| 541 |
+
domains = gr.Textbox(
|
| 542 |
+
label="보μ λλ©μΈ (μΌνλ‘ κ΅¬λΆ)",
|
| 543 |
+
placeholder="μ: mycompany.com, mycompany.ai, myproduct.io"
|
| 544 |
+
)
|
| 545 |
+
|
| 546 |
+
with gr.Row():
|
| 547 |
+
github_url = gr.Textbox(
|
| 548 |
+
label="GitHub μ μ₯μ URL",
|
| 549 |
+
placeholder="https://github.com/yourcompany/yourrepo"
|
| 550 |
+
)
|
| 551 |
+
github_stars = gr.Number(label="GitHub μ€ν μ", value=100)
|
| 552 |
+
|
| 553 |
+
gr.Markdown("### π μΈμ¦ λ° μμ")
|
| 554 |
+
with gr.Row():
|
| 555 |
+
awards = gr.Number(label="μ£Όμ μμ μ€μ μ", value=1)
|
| 556 |
+
partnerships = gr.Number(label="μ λ΅μ ννΈλμ μ", value=2)
|
| 557 |
+
|
| 558 |
+
with gr.Tab("ν λ° λΈλλ"):
|
| 559 |
+
gr.Markdown("### π₯ ν ꡬμ±")
|
| 560 |
+
with gr.Row():
|
| 561 |
+
team_size = gr.Number(label="μ 체 ν κ·λͺ¨", value=10)
|
| 562 |
+
phd_count = gr.Number(label="λ°μ¬ νμ 보μ μ μ", value=1)
|
| 563 |
+
|
| 564 |
+
with gr.Row():
|
| 565 |
+
serial_entrepreneurs = gr.Number(label="μ°μμ°½μ
κ° μ", value=1)
|
| 566 |
+
big_tech_experience = gr.Number(label="λΉ
ν
ν¬ μΆμ μΈμ", value=2)
|
| 567 |
+
|
| 568 |
+
gr.Markdown("### π± λΈλλ λ° μ¬μ©μ κΈ°λ°")
|
| 569 |
+
with gr.Row():
|
| 570 |
+
media_coverage = gr.Number(label="μ£Όμ μΈλ‘ 보λ μ", value=5)
|
| 571 |
+
app_downloads = gr.Number(label="μ± λ€μ΄λ‘λ μ (λ§)", value=10)
|
| 572 |
+
social_followers = gr.Number(label="μμ
λ―Έλμ΄ νλ‘μ (μ²)", value=50)
|
| 573 |
+
|
| 574 |
with gr.Tab("μ¬λ¬΄ νν©"):
|
| 575 |
gr.Markdown("### πΈ νκΈ μν© (λ¨μ: μ² λ¬λ¬)")
|
| 576 |
with gr.Row():
|
|
|
|
| 587 |
with gr.Column(scale=1):
|
| 588 |
metrics_table = gr.DataFrame(label="μ£Όμ μ§ν λΉκ΅")
|
| 589 |
|
| 590 |
+
with gr.Row():
|
| 591 |
+
comparison_chart = gr.Plot(label="λμ’
μ
κ³ λΉκ΅")
|
| 592 |
+
ip_chart = gr.Plot(label="IP μμ° λΆμ")
|
| 593 |
|
| 594 |
# μ΄λ²€νΈ μ°κ²°
|
| 595 |
evaluate_btn.click(
|
|
|
|
| 598 |
company_name, founded_year, industry, stage, revenue_type,
|
| 599 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 600 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 601 |
+
cash_balance, burn_rate,
|
| 602 |
+
domains, patent_filed, patent_granted, papers, trademarks,
|
| 603 |
+
github_url, github_stars, awards, partnerships,
|
| 604 |
+
team_size, phd_count, serial_entrepreneurs, big_tech_experience,
|
| 605 |
+
media_coverage, app_downloads, social_followers
|
| 606 |
],
|
| 607 |
+
outputs=[valuation_output, comparison_chart, ip_chart, metrics_table]
|
| 608 |
)
|
| 609 |
|
| 610 |
# μμ λ°μ΄ν° λ²νΌλ€
|
| 611 |
gr.Markdown("### π μμ λ°μ΄ν°λ‘ ν
μ€νΈνκΈ°")
|
| 612 |
with gr.Row():
|
| 613 |
+
gr.Button("AI μ€ννΈμ
μμ").click(
|
| 614 |
lambda: [
|
| 615 |
+
"AI Tech Corp", 2021, "AI/λ₯ν
ν¬", "μ±μ₯ λ¨κ³", "ꡬλ
ν (SaaS)",
|
| 616 |
100, 150, 200, 75, 2,
|
| 617 |
90, 40, 30, 20,
|
| 618 |
+
2000, 120,
|
| 619 |
+
"aitech.com, aitech.ai", 5, 2,
|
| 620 |
+
"NeurIPS 2023 - Novel AI Architecture\nhttps://arxiv.org/abs/2023.12345", 3,
|
| 621 |
+
"https://github.com/aitech/core", 500, 3, 5,
|
| 622 |
+
15, 3, 2, 4,
|
| 623 |
+
10, 50, 100
|
| 624 |
],
|
| 625 |
outputs=[
|
| 626 |
company_name, founded_year, industry, stage, revenue_type,
|
| 627 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 628 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 629 |
+
cash_balance, burn_rate,
|
| 630 |
+
domains, patent_filed, patent_granted, papers, trademarks,
|
| 631 |
+
github_url, github_stars, awards, partnerships,
|
| 632 |
+
team_size, phd_count, serial_entrepreneurs, big_tech_experience,
|
| 633 |
+
media_coverage, app_downloads, social_followers
|
| 634 |
]
|
| 635 |
)
|
| 636 |
|
| 637 |
+
gr.Button("λ°μ΄μ€ν
ν¬ μμ").click(
|
| 638 |
lambda: [
|
| 639 |
+
"BioHealth Inc", 2020, "ν¬μ€μΌμ΄", "μ΄κΈ° λ§€μΆ", "ꡬλ
ν (SaaS)",
|
| 640 |
+
80, 200, 500, 85, 1,
|
| 641 |
+
95, 20, 40, 30,
|
| 642 |
+
3000, 150,
|
| 643 |
+
"biohealth.com, biohealth.health", 8, 4,
|
| 644 |
+
"Nature Medicine 2023 - Breakthrough in Drug Discovery\nScience 2023 - Novel Biomarker", 5,
|
| 645 |
+
"https://github.com/biohealth/research", 200, 5, 3,
|
| 646 |
+
25, 8, 1, 3,
|
| 647 |
+
15, 5, 30
|
| 648 |
],
|
| 649 |
outputs=[
|
| 650 |
company_name, founded_year, industry, stage, revenue_type,
|
| 651 |
monthly_revenue, growth_rate, arpu, gross_margin, monthly_churn,
|
| 652 |
retention_rate, new_customers, monthly_marketing, monthly_sales,
|
| 653 |
+
cash_balance, burn_rate,
|
| 654 |
+
domains, patent_filed, patent_granted, papers, trademarks,
|
| 655 |
+
github_url, github_stars, awards, partnerships,
|
| 656 |
+
team_size, phd_count, serial_entrepreneurs, big_tech_experience,
|
| 657 |
+
media_coverage, app_downloads, social_followers
|
| 658 |
]
|
| 659 |
)
|
| 660 |
|