petter2025 commited on
Commit
99c36b7
·
verified ·
1 Parent(s): 4b27602

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,7 +11,7 @@ from typing import Dict, Any, List, Optional
11
  import threading
12
  import urllib.request
13
  import time
14
- from scipy.stats import beta # only beta is used
15
 
16
  # ----------------------------------------------------------------------
17
  # Memory monitoring (no external dependencies)
@@ -95,7 +95,6 @@ class BayesianRiskEngine:
95
  return self.alpha / (self.alpha + self.beta)
96
 
97
  def risk_interval(self, prob=0.95):
98
- """Return credible interval using scipy.stats.beta."""
99
  lo = beta.ppf((1 - prob) / 2, self.alpha, self.beta)
100
  hi = beta.ppf((1 + prob) / 2, self.alpha, self.beta)
101
  return lo, hi
@@ -326,7 +325,7 @@ log_memory_usage()
326
  # ----------------------------------------------------------------------
327
  # Gradio UI
328
  # ----------------------------------------------------------------------
329
- with gr.Blocks(title="ARF v4 – Bayesian Risk Scoring Demo", theme="soft") as demo:
330
  gr.Markdown("""
331
  # 🧠 ARF v4 – Bayesian Risk Scoring for AI Reliability (Demo)
332
  **Mathematically rigorous risk estimation using conjugate priors and MCMC**
 
11
  import threading
12
  import urllib.request
13
  import time
14
+ from scipy.stats import beta
15
 
16
  # ----------------------------------------------------------------------
17
  # Memory monitoring (no external dependencies)
 
95
  return self.alpha / (self.alpha + self.beta)
96
 
97
  def risk_interval(self, prob=0.95):
 
98
  lo = beta.ppf((1 - prob) / 2, self.alpha, self.beta)
99
  hi = beta.ppf((1 + prob) / 2, self.alpha, self.beta)
100
  return lo, hi
 
325
  # ----------------------------------------------------------------------
326
  # Gradio UI
327
  # ----------------------------------------------------------------------
328
+ with gr.Blocks(title="ARF v4 – Bayesian Risk Scoring Demo") as demo:
329
  gr.Markdown("""
330
  # 🧠 ARF v4 – Bayesian Risk Scoring for AI Reliability (Demo)
331
  **Mathematically rigorous risk estimation using conjugate priors and MCMC**