Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,6 @@ import matplotlib.pyplot as plt
|
|
| 5 |
|
| 6 |
theta = np.linspace(0, 1, 100)
|
| 7 |
|
| 8 |
-
def beta_function(alpha, beta)
|
| 9 |
-
|
| 10 |
def plot_beta(alpha, beta):
|
| 11 |
plt.plot(theta, scipy.stats.beta.pdf(theta, alpha, beta))
|
| 12 |
plt.ylim(0, 4)
|
|
@@ -15,5 +13,5 @@ def plot_beta(alpha, beta):
|
|
| 15 |
s1 = gradio.inputs.Slider(minimum=0, maximum=5, step=0.1, default=2, label=None)
|
| 16 |
s2 = gradio.inputs.Slider(minimum=0, maximum=5, step=0.1, default=2, label=None)
|
| 17 |
|
| 18 |
-
iface = gr.Interface(fn=
|
| 19 |
iface.launch()
|
|
|
|
| 5 |
|
| 6 |
theta = np.linspace(0, 1, 100)
|
| 7 |
|
|
|
|
|
|
|
| 8 |
def plot_beta(alpha, beta):
|
| 9 |
plt.plot(theta, scipy.stats.beta.pdf(theta, alpha, beta))
|
| 10 |
plt.ylim(0, 4)
|
|
|
|
| 13 |
s1 = gradio.inputs.Slider(minimum=0, maximum=5, step=0.1, default=2, label=None)
|
| 14 |
s2 = gradio.inputs.Slider(minimum=0, maximum=5, step=0.1, default=2, label=None)
|
| 15 |
|
| 16 |
+
iface = gr.Interface(fn=plot_beta, inputs=[s1, s2], outputs="image")
|
| 17 |
iface.launch()
|