Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -16,19 +16,19 @@ def calculate_equity_dilution(pre_money_valuation, investment_amount, current_ow
|
|
16 |
investor_ownership = (investment_amount / post_money_valuation) * 100
|
17 |
|
18 |
return f"""
|
19 |
-
π°
|
20 |
|
21 |
-
π
|
22 |
-
π΅
|
23 |
-
π
|
24 |
|
25 |
-
π₯
|
26 |
-
β’
|
27 |
-
β’
|
28 |
-
β’
|
29 |
-
β’
|
30 |
|
31 |
-
π
|
32 |
β’ You retain {new_ownership:.1f}% of the company
|
33 |
β’ Investor gets {investor_ownership:.1f}% for ${investment_amount:,.0f}
|
34 |
β’ Your stake is diluted by {dilution_percentage:.1f} percentage points
|
@@ -43,14 +43,14 @@ def calculate_runway(current_cash, monthly_burn, monthly_revenue=0):
|
|
43 |
|
44 |
if net_burn <= 0:
|
45 |
return f"""
|
46 |
-
π
|
47 |
|
48 |
-
π°
|
49 |
-
π
|
50 |
-
πΈ
|
51 |
-
π
|
52 |
|
53 |
-
π
|
54 |
Your business is sustainable and growing.
|
55 |
"""
|
56 |
|
@@ -77,21 +77,21 @@ def calculate_runway(current_cash, monthly_burn, monthly_revenue=0):
|
|
77 |
advice = "Strong position. Focus on growth and product development."
|
78 |
|
79 |
return f"""
|
80 |
-
β°
|
81 |
|
82 |
-
π°
|
83 |
-
π
|
84 |
-
πΈ
|
85 |
-
π
|
86 |
|
87 |
-
π―
|
88 |
-
β’
|
89 |
-
β’
|
90 |
-
β’
|
91 |
|
92 |
-
π‘
|
93 |
|
94 |
-
π
|
95 |
β’ To extend runway to 12 months: Reduce burn to ${current_cash/12:,.0f}/month
|
96 |
β’ To extend runway to 18 months: Reduce burn to ${current_cash/18:,.0f}/month
|
97 |
"""
|
@@ -132,26 +132,26 @@ def calculate_berkus_valuation(idea_score, prototype_score, team_score, market_s
|
|
132 |
risk_level = "π΄ VERY HIGH RISK"
|
133 |
investment_advice = "Major concerns across multiple areas"
|
134 |
|
135 |
-
breakdown = "\n".join([f"β’
|
136 |
for factor, score in factors.items()])
|
137 |
|
138 |
return f"""
|
139 |
-
π
|
140 |
|
141 |
{breakdown}
|
142 |
|
143 |
-
π°
|
144 |
-
π
|
145 |
-
β οΈ
|
146 |
|
147 |
-
π‘
|
148 |
|
149 |
-
π
|
150 |
β’ Maximum possible: $2,500,000 (5/5 on all factors)
|
151 |
β’ Your valuation: ${total_valuation:,.0f} ({total_score}/25 points)
|
152 |
β’ Percentile: {(total_valuation/2500000)*100:.1f}% of maximum
|
153 |
|
154 |
-
π
|
155 |
Consider other methods (DCF, Market Multiple) for revenue-generating companies.
|
156 |
"""
|
157 |
|
@@ -189,29 +189,29 @@ def calculate_investment_returns(investment_amount, exit_valuation, ownership_pe
|
|
189 |
grade = "C"
|
190 |
|
191 |
return f"""
|
192 |
-
π°
|
193 |
|
194 |
-
π
|
195 |
-
β’
|
196 |
-
β’
|
197 |
-
β’
|
198 |
-
β’
|
199 |
|
200 |
-
π―
|
201 |
-
β’
|
202 |
-
β’
|
203 |
-
β’
|
204 |
-
β’
|
205 |
-
β’
|
206 |
|
207 |
-
π
|
208 |
|
209 |
-
π
|
210 |
β’ Top-tier VC target: 10x+ multiple, 25%+ IRR
|
211 |
β’ Good VC return: 3-10x multiple, 15-25% IRR
|
212 |
β’ Acceptable return: 2-3x multiple, 10-15% IRR
|
213 |
|
214 |
-
π‘
|
215 |
{"This exceeds top-tier VC expectations!" if multiple >= 10 else
|
216 |
"Strong return meeting VC expectations." if multiple >= 3 else
|
217 |
"Below typical VC return expectations." if multiple >= 2 else
|
@@ -249,31 +249,31 @@ def calculate_cap_table(founders_shares, employee_pool_percent, series_a_investm
|
|
249 |
founders_dilution = 100 - founders_ownership - employee_ownership
|
250 |
|
251 |
return f"""
|
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 |
β’ Each founder share is now worth ${series_a_price_per_share:.2f}
|
278 |
β’ Total founder equity value: ${(founders_shares * series_a_price_per_share):,.0f}
|
279 |
β’ Employee pool value: ${(employee_shares * series_a_price_per_share):,.0f}
|
|
|
16 |
investor_ownership = (investment_amount / post_money_valuation) * 100
|
17 |
|
18 |
return f"""
|
19 |
+
π° EQUITY DILUTION RESULTS
|
20 |
|
21 |
+
π Pre-money Valuation: ${pre_money_valuation:,.0f}
|
22 |
+
π΅ Investment Amount: ${investment_amount:,.0f}
|
23 |
+
π Post-money Valuation: ${post_money_valuation:,.0f}
|
24 |
|
25 |
+
π₯ Ownership Changes:
|
26 |
+
β’ Your ownership before: {current_ownership:.2f}%
|
27 |
+
β’ Your ownership after: {new_ownership:.2f}%
|
28 |
+
β’ Dilution: {dilution_percentage:.2f}%
|
29 |
+
β’ Investor ownership: {investor_ownership:.2f}%
|
30 |
|
31 |
+
π Key Insights:
|
32 |
β’ You retain {new_ownership:.1f}% of the company
|
33 |
β’ Investor gets {investor_ownership:.1f}% for ${investment_amount:,.0f}
|
34 |
β’ Your stake is diluted by {dilution_percentage:.1f} percentage points
|
|
|
43 |
|
44 |
if net_burn <= 0:
|
45 |
return f"""
|
46 |
+
π CONGRATULATIONS! YOU'RE PROFITABLE
|
47 |
|
48 |
+
π° Current Cash: ${current_cash:,.0f}
|
49 |
+
π Monthly Revenue: ${monthly_revenue:,.0f}
|
50 |
+
πΈ Monthly Burn: ${monthly_burn:,.0f}
|
51 |
+
π Net Cash Flow: +${abs(net_burn):,.0f}/month
|
52 |
|
53 |
+
π You're generating positive cash flow!
|
54 |
Your business is sustainable and growing.
|
55 |
"""
|
56 |
|
|
|
77 |
advice = "Strong position. Focus on growth and product development."
|
78 |
|
79 |
return f"""
|
80 |
+
β° RUNWAY CALCULATION
|
81 |
|
82 |
+
π° Current Cash: ${current_cash:,.0f}
|
83 |
+
π Monthly Revenue: ${monthly_revenue:,.0f}
|
84 |
+
πΈ Monthly Burn: ${monthly_burn:,.0f}
|
85 |
+
π Net Burn: ${net_burn:,.0f}/month
|
86 |
|
87 |
+
π― Runway Results:
|
88 |
+
β’ Runway: {runway_months:.1f} months ({runway_days:.0f} days)
|
89 |
+
β’ Cash depletes on: {cash_out_date.strftime('%B %d, %Y')}
|
90 |
+
β’ Status: {status}
|
91 |
|
92 |
+
π‘ Recommendation: {advice}
|
93 |
|
94 |
+
π Burn Rate Optimization:
|
95 |
β’ To extend runway to 12 months: Reduce burn to ${current_cash/12:,.0f}/month
|
96 |
β’ To extend runway to 18 months: Reduce burn to ${current_cash/18:,.0f}/month
|
97 |
"""
|
|
|
132 |
risk_level = "π΄ VERY HIGH RISK"
|
133 |
investment_advice = "Major concerns across multiple areas"
|
134 |
|
135 |
+
breakdown = "\n".join([f"β’ {factor}: {score}/5 β ${score * max_per_factor:,.0f}"
|
136 |
for factor, score in factors.items()])
|
137 |
|
138 |
return f"""
|
139 |
+
π BERKUS METHOD VALUATION
|
140 |
|
141 |
{breakdown}
|
142 |
|
143 |
+
π° Total Valuation: ${total_valuation:,.0f}
|
144 |
+
π Average Score: {avg_score:.1f}/5
|
145 |
+
β οΈ Risk Level: {risk_level}
|
146 |
|
147 |
+
π‘ Investment Advice: {investment_advice}
|
148 |
|
149 |
+
π Valuation Breakdown:
|
150 |
β’ Maximum possible: $2,500,000 (5/5 on all factors)
|
151 |
β’ Your valuation: ${total_valuation:,.0f} ({total_score}/25 points)
|
152 |
β’ Percentile: {(total_valuation/2500000)*100:.1f}% of maximum
|
153 |
|
154 |
+
π Note: Berkus Method is ideal for pre-revenue startups.
|
155 |
Consider other methods (DCF, Market Multiple) for revenue-generating companies.
|
156 |
"""
|
157 |
|
|
|
189 |
grade = "C"
|
190 |
|
191 |
return f"""
|
192 |
+
π° INVESTMENT RETURN ANALYSIS
|
193 |
|
194 |
+
π Investment Details:
|
195 |
+
β’ Initial Investment: ${investment_amount:,.0f}
|
196 |
+
β’ Exit Valuation: ${exit_valuation:,.0f}
|
197 |
+
β’ Your Ownership: {ownership_percentage:.2f}%
|
198 |
+
β’ Time to Exit: {years_to_exit} years
|
199 |
|
200 |
+
π― Return Metrics:
|
201 |
+
β’ Exit Value: ${exit_value:,.0f}
|
202 |
+
β’ Total Return: ${total_return:,.0f}
|
203 |
+
β’ ROI: {roi_percentage:.1f}%
|
204 |
+
β’ Multiple: {multiple:.1f}x
|
205 |
+
β’ IRR: {irr:.1f}% per year
|
206 |
|
207 |
+
π Performance: {performance} (Grade: {grade})
|
208 |
|
209 |
+
π Benchmarks:
|
210 |
β’ Top-tier VC target: 10x+ multiple, 25%+ IRR
|
211 |
β’ Good VC return: 3-10x multiple, 15-25% IRR
|
212 |
β’ Acceptable return: 2-3x multiple, 10-15% IRR
|
213 |
|
214 |
+
π‘ Analysis:
|
215 |
{"This exceeds top-tier VC expectations!" if multiple >= 10 else
|
216 |
"Strong return meeting VC expectations." if multiple >= 3 else
|
217 |
"Below typical VC return expectations." if multiple >= 2 else
|
|
|
249 |
founders_dilution = 100 - founders_ownership - employee_ownership
|
250 |
|
251 |
return f"""
|
252 |
+
π CAP TABLE ANALYSIS
|
253 |
+
|
254 |
+
π’ Pre-Series A Structure:
|
255 |
+
β’ Founders: {founders_shares:,.0f} shares
|
256 |
+
β’ Employee Pool: {employee_shares:,.0f} shares ({employee_pool_percent}%)
|
257 |
+
β’ Total Pre-Series A: {pre_series_a_shares:,.0f} shares
|
258 |
+
|
259 |
+
π° Series A Details:
|
260 |
+
β’ Investment: ${series_a_investment:,.0f}
|
261 |
+
β’ Pre-money Valuation: ${series_a_pre_money:,.0f}
|
262 |
+
β’ Post-money Valuation: ${post_money_valuation:,.0f}
|
263 |
+
β’ Price per Share: ${series_a_price_per_share:.2f}
|
264 |
+
β’ New Shares Issued: {series_a_shares:,.0f}
|
265 |
+
|
266 |
+
π₯ Post-Series A Ownership:
|
267 |
+
β’ Founders: {founders_ownership:.1f}% ({founders_shares:,.0f} shares)
|
268 |
+
β’ Employee Pool: {employee_ownership:.1f}% ({employee_shares:,.0f} shares)
|
269 |
+
β’ Series A Investors: {investor_ownership:.1f}% ({series_a_shares:,.0f} shares)
|
270 |
+
β’ Total Shares: {total_shares:,.0f}
|
271 |
+
|
272 |
+
π Dilution Impact:
|
273 |
+
β’ Founders diluted by: {founders_dilution:.1f} percentage points
|
274 |
+
β’ Founders retain: {founders_ownership:.1f}% ownership
|
275 |
+
|
276 |
+
π‘ Key Insights:
|
277 |
β’ Each founder share is now worth ${series_a_price_per_share:.2f}
|
278 |
β’ Total founder equity value: ${(founders_shares * series_a_price_per_share):,.0f}
|
279 |
β’ Employee pool value: ${(employee_shares * series_a_price_per_share):,.0f}
|