Spaces:
Runtime error
Runtime error
clickable link
Browse files
app.py
CHANGED
|
@@ -185,6 +185,8 @@ with gr.Blocks() as results_viz:
|
|
| 185 |
variant="primary"
|
| 186 |
)
|
| 187 |
refresh_status = gr.Textbox()
|
|
|
|
|
|
|
| 188 |
|
| 189 |
def check_and_refresh():
|
| 190 |
# For now just return hardcoded ID
|
|
@@ -197,7 +199,7 @@ with gr.Blocks() as results_viz:
|
|
| 197 |
current_ci_id = ""
|
| 198 |
|
| 199 |
if latest_ci_id == current_ci_id:
|
| 200 |
-
return "No new CI results available yet.", test_results_plot
|
| 201 |
else:
|
| 202 |
fetch_and_process_ci_results(latest_ci_id)
|
| 203 |
with open("ci_id.txt", "w") as f:
|
|
@@ -209,9 +211,9 @@ with gr.Blocks() as results_viz:
|
|
| 209 |
# Create a new BarPlot with the updated data
|
| 210 |
new_test_results_plot = create_bar_plot(new_model_test_results, new_model_order, new_failed_models_counts)
|
| 211 |
|
| 212 |
-
return "CI results refreshed successfully!", new_test_results_plot
|
| 213 |
|
| 214 |
-
refresh_btn.click(fn=check_and_refresh, outputs=[refresh_status, test_results_plot])
|
| 215 |
|
| 216 |
|
| 217 |
if __name__ == "__main__":
|
|
|
|
| 185 |
variant="primary"
|
| 186 |
)
|
| 187 |
refresh_status = gr.Textbox()
|
| 188 |
+
|
| 189 |
+
ci_link = gr.HTML()
|
| 190 |
|
| 191 |
def check_and_refresh():
|
| 192 |
# For now just return hardcoded ID
|
|
|
|
| 199 |
current_ci_id = ""
|
| 200 |
|
| 201 |
if latest_ci_id == current_ci_id:
|
| 202 |
+
return "No new CI results available yet.", test_results_plot, f'<a href="https://github.com/huggingface/transformers/actions/runs/{latest_ci_id}" target="_blank">Latest CI Run</a>'
|
| 203 |
else:
|
| 204 |
fetch_and_process_ci_results(latest_ci_id)
|
| 205 |
with open("ci_id.txt", "w") as f:
|
|
|
|
| 211 |
# Create a new BarPlot with the updated data
|
| 212 |
new_test_results_plot = create_bar_plot(new_model_test_results, new_model_order, new_failed_models_counts)
|
| 213 |
|
| 214 |
+
return "CI results refreshed successfully!", new_test_results_plot, f'<a href="https://github.com/huggingface/transformers/actions/runs/{latest_ci_id}" target="_blank">Latest CI Run</a>'
|
| 215 |
|
| 216 |
+
refresh_btn.click(fn=check_and_refresh, outputs=[refresh_status, test_results_plot, ci_link])
|
| 217 |
|
| 218 |
|
| 219 |
if __name__ == "__main__":
|