mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
* fixed visibility error in notebooks in github * Delete fixNotebooks.py deleted script used to fix notebooks * Update generate_notebooks.py fixed a small bug that prevented visibility of notebooks in GitHub
895 B
895 B
Gradio Demo: score_tracker¶
In [ ]:
!pip install -q gradio
In [ ]:
import gradio as gr scores = [] def track_score(score): scores.append(score) top_scores = sorted(scores, reverse=True)[:3] return top_scores demo = gr.Interface( track_score, gr.Number(label="Score"), gr.JSON(label="Top Scores") ) if __name__ == "__main__": demo.launch()