Spaces:
Build error
Build error
| import gradio as gr | |
| import utils | |
| DESCRIPTION = """ | |
| This Space helps you find out the top-n slow tests from a particular GitHub Action run step. It also buckets the tests w.r.t their durations. | |
| """ | |
| ARTICLE = """ | |
| To obtain the article name you're looking for, you need to scroll down the run page (for [example](https://github.com/huggingface/diffusers/actions/runs/8430950874/)) and select one from the 'Artifacts' section. | |
| """ | |
| with gr.Interface( | |
| fn=utils.analyze_tests, | |
| inputs=[ | |
| gr.Textbox(info="GitHub repository ID", placeholder="huggingface/diffusers"), | |
| gr.Textbox(placeholder="GitHub token", type="password"), | |
| gr.Textbox(placeholder="GitHub Action run ID"), | |
| gr.Textbox(info="Artifact name", placeholder="pr_flax_cpu_test_reports"), | |
| gr.Slider(2, 20, value=1, label="top-n", info="Top-n slow tests."), | |
| ], | |
| outputs=gr.Markdown(label="output"), | |
| examples=[ | |
| ['huggingface/diffusers', 'ghp_XXX', '8430950874', 'pr_torch_cpu_pipelines_test_reports', 5], | |
| ], | |
| title="Short analysis of PR tests!", | |
| description=DESCRIPTION, | |
| article=ARTICLE, | |
| allow_flagging="never", | |
| cache_examples=False, | |
| ) as demo: | |
| demo.queue() | |
| demo.launch(show_error=True) |