Spaces:
Runtime error
Runtime error
File size: 2,197 Bytes
d2e5b38 0166499 d2e5b38 9c032d8 92a6755 663f544 9c032d8 d2e5b38 28f4b4e 8565080 d2e5b38 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
import streamlit as st
from dashboard_utils.bubbles import get_new_bubble_data
from dashboard_utils.main_metrics import get_main_metrics
from streamlit_observable import observable
def draw_current_progress():
st.markdown("<br>", unsafe_allow_html=True)
source = get_main_metrics()
st.vega_lite_chart(
source, {
"height": 200,
"title": {
"text": "Training DALL-E with volunteers (updated every few minutes during NeurIPS 2021)",
"dy": 6,
},
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Current training progress",
"encoding": {"x": {"field": "wall time", "type": "temporal"}},
"config": {"axisX": {"labelAngle": -40}},
"resolve": {"scale": {"y": "independent"}},
"layer": [
{
"mark": {"type": "line", "point": {"tooltip": True, "filled": False, "strokeOpacity": 0},
"color": "#85A9C5"},
"encoding": {
"y": {"field": "training loss", "type": "quantitative", "axis": {"titleColor": "#85A9C5"}}},
},
{
"mark": {"type": "line", "point": {"tooltip": True, "filled": False, "strokeOpacity": 0.0},
"color": "#85C5A6", "opacity": 0.5},
"encoding": {
"y": {"field": "active participants", "type": "quantitative",
"axis": {"titleColor": "#85C5A6"}}},
},
],
},
use_container_width=True,
)
def draw_participant_bubbles():
with st.expander("Who's training?", expanded=False):
st.markdown("### Collaborative training participants\n(may take a few seconds to load)")
serialized_data, profiles = get_new_bubble_data()
observable(
"Participants",
notebook="d/9ae236a507f54046", # "@huggingface/participants-bubbles-chart",
targets=["c_noaws"],
redefine={"serializedData": serialized_data, "profileSimple": profiles},
) |