Spaces:
Runtime error
Runtime error
Commit
·
573de57
1
Parent(s):
29b9fda
debug
Browse files
app.py
CHANGED
|
@@ -16,6 +16,35 @@ st.markdown("## Full demo content will be posted here on December 7th!")
|
|
| 16 |
|
| 17 |
make_header()
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
content_text(f"""
|
| 20 |
There was a time when you could comfortably train SoTA vision and language models at home on your workstation.
|
| 21 |
The first ConvNet to beat ImageNet took in 5-6 days on two gamer-grade GPUs{cite("alexnet")}. Today's top-1 imagenet model
|
|
|
|
| 16 |
|
| 17 |
make_header()
|
| 18 |
|
| 19 |
+
|
| 20 |
+
from bokeh.layouts import column
|
| 21 |
+
from bokeh.models import ColumnDataSource, CustomJS, Slider
|
| 22 |
+
from bokeh.plotting import Figure, output_file, show
|
| 23 |
+
x = [x*0.005 for x in range(0, 200)]
|
| 24 |
+
y = x
|
| 25 |
+
source = ColumnDataSource(data=dict(x=x, y=y))
|
| 26 |
+
|
| 27 |
+
plot = Figure(width=400, height=400)
|
| 28 |
+
plot.line('x', 'y', source=source, line_width=3, line_alpha=0.6)
|
| 29 |
+
|
| 30 |
+
callback = CustomJS(args=dict(source=source), code="""
|
| 31 |
+
const data = source.data;
|
| 32 |
+
const f = cb_obj.value
|
| 33 |
+
const x = data['x']
|
| 34 |
+
const y = data['y']
|
| 35 |
+
for (let i = 0; i < x.length; i++) {
|
| 36 |
+
y[i] = Math.pow(x[i], f)
|
| 37 |
+
}
|
| 38 |
+
source.change.emit();
|
| 39 |
+
alert("123");
|
| 40 |
+
""")
|
| 41 |
+
|
| 42 |
+
slider = Slider(start=0.1, end=4, value=1, step=.1, title="power")
|
| 43 |
+
slider.js_on_change('value', callback)
|
| 44 |
+
|
| 45 |
+
layout = column(slider, plot)
|
| 46 |
+
st.bokeh_chart(layout)
|
| 47 |
+
|
| 48 |
content_text(f"""
|
| 49 |
There was a time when you could comfortably train SoTA vision and language models at home on your workstation.
|
| 50 |
The first ConvNet to beat ImageNet took in 5-6 days on two gamer-grade GPUs{cite("alexnet")}. Today's top-1 imagenet model
|