RamAnanth1 commited on
Commit
c956759
·
1 Parent(s): aefcfee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -41,6 +41,7 @@ def curve_fit(size, alpha, lam):
41
  reg = BayesianRidge(tol=1e-6, fit_intercept=False, compute_score=True)
42
 
43
  fig, axes = plt.subplots(1, 2, figsize=(8, 4))
 
44
  for i, ax in enumerate(axes):
45
  # Bayesian ridge regression with different initial value pairs
46
  if i == 0:
@@ -67,8 +68,9 @@ def curve_fit(size, alpha, lam):
67
  reg.alpha_, reg.lambda_, reg.scores_[-1]
68
  )
69
  ax.text(0.05, -1.0, text, fontsize=12)
 
70
 
71
- return fig[0], fig[1]
72
 
73
 
74
  with gr.Blocks(theme=theme) as demo:
 
41
  reg = BayesianRidge(tol=1e-6, fit_intercept=False, compute_score=True)
42
 
43
  fig, axes = plt.subplots(1, 2, figsize=(8, 4))
44
+ results = []
45
  for i, ax in enumerate(axes):
46
  # Bayesian ridge regression with different initial value pairs
47
  if i == 0:
 
68
  reg.alpha_, reg.lambda_, reg.scores_[-1]
69
  )
70
  ax.text(0.05, -1.0, text, fontsize=12)
71
+ results[i] = ax
72
 
73
+ return results
74
 
75
 
76
  with gr.Blocks(theme=theme) as demo: