Spaces:
Running
Running
Download app.py from harmdevries/bigcode_planning: direct link, hf CLI and curl.
- Browser
- Download file 791 Bytes
-
https://huggingface.co/spaces/harmdevries/bigcode_planning/resolve/215416f7afd5fdd5f8a00a5f1e0e605f97e7800d/app.py
- Command line
-
hf download hf://spaces/harmdevries/bigcode_planning@215416f7afd5fdd5f8a00a5f1e0e605f97e7800d/app.py
-
curl -L -o app.py https://huggingface.co/spaces/harmdevries/bigcode_planning/resolve/215416f7afd5fdd5f8a00a5f1e0e605f97e7800d/app.py
791 Bytes
| from github import Github | |
| import os | |
| import streamlit as st | |
| import plotly.figure_factory as ff | |
| g = Github(os.environ.get('github')) | |
| inference_repo = g.get_repo("bigcode-project/bigcode-inference-benchmark") | |
| df = list() | |
| for milestone in inference_repo.get_milestones(): | |
| desc = dict() | |
| for line in milestone.description.split('\n'): | |
| tmp = line.split(":") | |
| desc[tmp[0].lower()] = tmp[1].lower() | |
| st.write(desc) | |
| df.append(dict(Task=milestone.title, Start=desc['start date'], Finish=milestone.due_on, Resource=desc['status'])) | |
| colors = {'not started': 'rgb(220, 0, 0)', | |
| 'incomplete': (1, 0.9, 0.16), | |
| 'complete': 'rgb(0, 255, 100)'} | |
| fig = ff.create_gantt(df, colors=colors, index_col='Resource', show_colorbar=True) | |
| st.plotly_chart(fig) | |