axelsirota commited on
Commit
c0c59bd
·
verified ·
1 Parent(s): 2c2d0e8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -127,8 +127,11 @@ def calculate_metrics(tp, fp, fn, tn, fp_cost, fn_cost, tp_revenue):
127
 
128
  with gr.Blocks(title="Metrics Explainer", theme=gr.themes.Soft(primary_hue="blue")) as demo:
129
  gr.Markdown(
130
- "# Metrics Explainer\n"
131
- "Adjust the confusion matrix and costs to see how metrics and business impact change.\n"
 
 
 
132
  "**Every metric is a business decision.**"
133
  )
134
 
@@ -171,7 +174,12 @@ with gr.Blocks(title="Metrics Explainer", theme=gr.themes.Soft(primary_hue="blue
171
  # Auto-calculate on load
172
  demo.load(calculate_metrics, inputs, outputs)
173
 
174
- gr.Markdown("---\n*AI for Product Managers*")
 
 
 
 
 
175
 
176
 
177
  if __name__ == "__main__":
 
127
 
128
  with gr.Blocks(title="Metrics Explainer", theme=gr.themes.Soft(primary_hue="blue")) as demo:
129
  gr.Markdown(
130
+ "# Metrics Explainer\n\n"
131
+ "**PM Decision:** When your team reports 'accuracy is 95%,' ask: what's the cost "
132
+ "of the 5% errors? This tool helps you translate technical metrics into dollar "
133
+ "amounts stakeholders understand. Use it to decide whether to optimize for precision or recall.\n\n"
134
+ "Adjust the confusion matrix and costs to see how metrics and business impact change. "
135
  "**Every metric is a business decision.**"
136
  )
137
 
 
174
  # Auto-calculate on load
175
  demo.load(calculate_metrics, inputs, outputs)
176
 
177
+ gr.Markdown(
178
+ "---\n"
179
+ "**PM Takeaway:** Always ask: what does a false positive cost vs a false negative? "
180
+ "The answer determines which metric to optimize and how to set the threshold.\n\n"
181
+ "*AI for Product Managers*"
182
+ )
183
 
184
 
185
  if __name__ == "__main__":