Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from gradio_gpu_monitor import GPUMonitor | |
| head_html = """<script src="https://unpkg.com/lucide@latest"></script>""" | |
| with gr.Blocks() as demo: | |
| gr.Markdown( | |
| """ | |
| # ☰ GPU Monitor Component Demo | |
| <span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_gpumonitor'>Component GitHub Code</a></span> | |
| <p>Custom real-time GPU monitoring component for Gradio apps using `gr.HTML`.</p> | |
| """ | |
| ) | |
| gr.Markdown("# Control Panel") | |
| GPUMonitor(update_interval=2000, show_last_updated=True) | |
| if __name__ == "__main__": | |
| demo.launch(head=head_html, theme=gr.themes.Monochrome()) |