import requests import gradio as gr # 👉 මෙතන links add කරන්න URLS = [ "https://srinetwork-api.hf.space", "https://srinetwork-uptimer.hf.space", "https://srinetwork-api.hf.space" ] def check_urls(): results = [] for url in URLS: try: response = requests.get(url, timeout=5) status = f"🟢 UP ({response.status_code})" except: status = "🔴 DOWN" results.append([url, status]) return results def refresh(): return check_urls() with gr.Blocks() as app: gr.Markdown("# 🌐 Simple Uptime Monitor") table = gr.Dataframe(headers=["URL", "Status"], value=check_urls()) btn = gr.Button("🔄 Refresh") btn.click(refresh, outputs=table) app.launch()