Spaces:
Running
Running
File size: 10,605 Bytes
8041d67 4f2be76 4e1c32a cb65975 1c65013 09a7d59 1223c0d 1c65013 4e1c32a 4f2be76 d870b92 2877b2d 67c9619 7cec7f1 906c08e 7cec7f1 09a7d59 92f15ad 67c9619 8b8facf 5b51aa1 8b8facf 8f3e12c 5b51aa1 8f3e12c d3f4fff bbceb50 aaf56de 70c6b3e aaf56de bbceb50 4724fdb bbceb50 2f1fe17 8f3e12c 871ce58 9a6c24a 01b6321 9a6c24a e69f255 9a6c24a 2f1fe17 9a6c24a 6c5d10a 703aa27 67c9619 b7f3af4 09a7d59 b7f3af4 09a7d59 92f15ad 1c65013 2c783de 67c9619 b262257 67c9619 b262257 67c9619 db7d3b2 b262257 67c9619 09a7d59 4e1c32a 67c9619 09a7d59 b262257 2877b2d 67c9619 46a61fe 09a7d59 2c783de 6f3d99c 2c783de 09a7d59 cb65975 2c783de 03fea9e 2c783de 09a7d59 2c783de 6705a11 d870b92 2c783de 7cec7f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
import gradio as gr
import requests
import logging
import threading
import time
from pydantic import BaseModel, ConfigDict
from typing import Any
logging.basicConfig(level=logging.INFO)
css = """
footer { visibility: hidden; }
.status-button {
display: inline-block;
padding: 5px 10px;
margin: 5px;
border-radius: 5px;
font-size: 12px;
color: black; /* ๊ธ์ ์์์ ๊ฒ์์์ผ๋ก ๋ณ๊ฒฝ */
}
.status-normal { background-color: #90EE90; }
.status-abnormal { background-color: #FFA07A; }
"""
# ๋ชจ๋ํฐ๋ง ๋์ ๋ชฉ๋ก
TARGETS = [
{"name": "[MON]๊ด๋ฆฌ-HOME", "url": "https://seawolf2357-bnews1.hf.space"},
{"name": "[MON]๊ด๋ฆฌ-H100 LIST", "url": "https://seawolf2357-bnews2.hf.space"},
{"name": "[MON]๊ด๋ฆฌ-MONITOR Origin", "url": "https://seawolf2357-bnews3.hf.space"},
# {"name": "[MON]AI Playgroud ๋ฉ๋ด", "url": "https://aiqtech-ofai-stream-menu-backup.hf.space"},
{"name": "[MON]ํ์ด๋จธ1-1 ", "url": "https://seawolf2357-timer.hf.space"},
{"name": "[MON]ํ์ด๋จธ1-2 ", "url": "https://seawolf2357-timer2.hf.space"},
{"name": "[MON]ํ์ด๋จธ1-3 ", "url": "https://seawolf2357-timer3.hf.space"},
{"name": "[MON]ํ์ด๋จธ1-4 ", "url": "https://seawolf2357-timer4.hf.space"},
{"name": "[MON]ํ์ด๋จธ2-1 ", "url": "https://fantaxy-timer1.hf.space"},
{"name": "[MON]ํ์ด๋จธ2-2 ", "url": "https://fantaxy-timer2.hf.space"},
{"name": "[H100]AI ๊ฐ์ธ๋น์ JinJAVIS", "url": "http://hugpu.ai:8000"},
{"name": "[H100]์๋ฐํ ์คํ๋์ค ํ๋ซํผ ", "url": "http://hugpu.ai:7899"},
{"name": "[H100]์ํผ ์คํ๋์ค ํ๋ซ", "url": "http://211.233.58.202:7960"},
{"name": "[H100]ํตํฉ Medim ๋ธ๋ก๊ทธ ์์คํ
", "url": "http://hugpu.ai:7917"},
{"name": "[H100]์ด๊ณ ์/ํ
์คํธ ๋ฐ์ ๋ก๊ณ ์์ฑ", "url": "http://hugpu.ai:7897"},
{"name": "[H100]์ฌ์ง+์์ฑ to ๋งํ๋ ์์", "url": "http://hugpu.ai:7895"},
{"name": "[H100]I+T2I ์บ๋ฆญํฐ ํ๋กํ", "url": "http://hugpu.ai:7889"},
{"name": "[H100]๋ชจ์
๋ฐ๋ผํ๊ธฐ", "url": "http://hugpu.ai:7894"},
{"name": "[H100]์๋ฆฌ๋ฐ๋ฐ 'AnyText'", "url": "http://hugpu.ai:7913"},
{"name": "[@ H100]๋ฉํ ์ค๋ ๋ AUTO", "url": "http://hugpu.ai:7915"},
{"name": "[@ H100]ํจ์
", "url": "http://hugpu.ai:7896"},
{"name": "[@ H100]Image + Text to Image(IP-ADAPT)", "url": "http://hugpu.ai:7890"},
{"name": "[@ H100]FaceFusion", "url": "http://hugpu.ai:7880"},
{"name": "[OFAI]FLUX ํ์ฅ ์ด๋ฏธ์ง ์์ฑ", "url": "https://fantaxy-ofai-flx-expl-store.hf.space"},
{"name": "[OFAI]FLUX GIF ์์ฑ", "url": "https://aiqtech-flxgif.hf.space"},
{"name": "[OFAILOGO ๋์์ธ ์์ฑ ", "url": "https://fantaxy-ofai-flx-logo.hf.space"},
{"name": "[OFAI]FLUX ํ๋กฌํํธ ์์ฑ ", "url": "https://ginipick-flux-prompt-generator.hf.space"},
{"name": "[OFAI]LoRA: ๊ธฐ๋ธ๋ฆฌ ์คํ์ผ ", "url": "https://aiqtech-flux-ghibli-studio-lora.hf.space"},
{"name": "[OFAI]LoRA: ์นดํฐ ์คํ์ผ ", "url": "https://aiqtech-flxani.hf.space"},
{"name": "[OFAI]FLUX 8step LoRA ์ด๋ฏธ์ง ์์ฑ ", "url": "https://fantos-flx8lora.hf.space"},
{"name": "[OFAI]FLUX ํ
์คํธ TO ๋น๋์ค ์์ฑ ", "url": "https://fantos-cogvidx.hf.space"},
{"name": "[OFAI]FLUX ํจ์
๋ชจ๋ธ ์์ฑ ", "url": "https://fantos-flxfashmodel.hf.space"},
{"name": "[OFAI]FLUX Controlnet ", "url": "https://fantos-flxcontrol.hf.space"},
{"name": "[OFAI]FLUX NF4 ์ด๋ฏธ์ง ์์ฑ ", "url": "https://ginipick-ofai-flxnf4.hf.space"},
{"name": "[OFAI]FLUX LoRA ์คํ๋์ค #1๋ฒ ์๋ฒ ", "url": "https://seawolf2357-flxloraexp.hf.space"},
{"name": "[OFAI]FLUX LoRA ์คํ๋์ค #2๋ฒ ์๋ฒ ", "url": "https://fantaxy-flxloraexp.hf.space"},
{"name": "[OFAI]FLUX LoRA ์คํ๋์ค #3๋ฒ ์๋ฒ ", "url": "https://fantos-flxloraexp.hf.space"},
{"name": "[OFAI]FLUX LoRA ์คํ๋์ค #4๋ฒ ์๋ฒ", "url": "https://ginipick-flxloraexp.hf.space"},
{"name": "[OFAI]์ด๋ฏธ์ง์ ํ๊ธ ํ๋กฌํํธ๋ก ์์ ์์ฑ I ", "url": "https://fantaxy-ofai-it2v2.hf.space"},
{"name": "[OFAI]์ด๋ฏธ์ง์ ํ๊ธ ํ๋กฌํํธ๋ก ์์ ์์ฑ II ", "url": "https://aiqtech-cinevid.hf.space"},
{"name": "[OFAI]์ด๋ฏธ์ง์ ํ๊ธ ํ๋กฌํํธ๋ก ์ด๋ฏธ์ง ๋ณํ", "url": "https://fantos-kolcontrl.hf.space"},
{"name": "[OFAI]์ํ ์ฌ์ง ์
๋ก๋+ํ๋กฌํํธ๋ก ๋ฐฐ๊ฒฝ์ ํฉ์ฑ ", "url": "https://aiqtech-producbrmg.hf.space"},
{"name": "[OFAI]ํ
์คํธ๋ก ์ด๋ฏธ์ง ์์ฑ: Accracy ๋ชจ๋ธ ", "url": "https://ginipick-accdiffusion.hf.space"},
{"name": "[OFAI]ํ
์คํธ๋ก ์ด๋ฏธ์ง ์์ฑ: Playground ๋ชจ๋ธ ", "url": "https://fantaxy-playground25.hf.space"},
{"name": "[OFAI]ํ
์คํธ๋ก ์ด๋ฏธ์ง ์์ฑ: AuraFlow ๋ชจ๋ธ ", "url": "https://fantaxy-auroflow-v3.hf.space"},
{"name": "[OFAI]EveryText: ๋ชจ๋ ๋ฌธ์๊ฐ ์ด๋ฏธ์ง ์์ฑ์ ๋ฐ์ ", "url": "https://fantos-EveryText.hf.space"},
{"name": "[OFAI]๋ด ์ผ๊ตด ์ฌ์ง์ผ๋ก ์ด๋ฏธ์ง ์์ฑ I", "url": "https://aiqtech-kofaceid.hf.space"},
{"name": "[OFAI]๋ด ์ผ๊ตด ์ฌ์ง์ผ๋ก ์ด๋ฏธ์ง ์์ฑ II", "url": "https://aiqtech-sdfacid.hf.space"},
{"name": "[OFAI]๊ณ ํด์๋ ์ด๋ฏธ์ง ์์ฑ REALVISXL V5", "url": "https://seawolf2357-REALVISXL-V5.hf.space"},
{"name": "[OFAI]ํ
์คํธ๋ก ๊ฐ์ฒด๋ง ์๋ผ๋ด๊ณ ๋ฐฐ๊ฒฝ ํฌ๋ช
ํ", "url": "https://fantos-textcutobject.hf.space"},
{"name": "[OFAI]๋น๋์ค ์ธ์ QnA ์ฑ๋ด ", "url": "https://ginipick-vidiqa.hf.space"},
{"name": "[OFAI]์ด๋ฏธ์ง ์ค์ผ์ผ์
(ํ์ง๊ฐ์ ) ", "url": "https://ginipick-finegrain-image-enhancer.hf.space"},
{"name": "[OFAI]์ด๋ฏธ์ง ๋ฐฐ๊ฒฝ ์ ๊ฑฐ ", "url": "https://ginipick-background-removal.hf.space"},
{"name": "[OFAI]๋น๋์ค ๋ฐฐ๊ฒฝ ์ ๊ฑฐ ", "url": "https://fantaxy-remove-video-background.hf.space"},
{"name": "[OFAI]ํ
์คํธ ์
๋ ฅ์ผ๋ก ์์
์์ฑ ", "url": "https://fantaxy-stable-audio-open-zero.hf.space"},
{"name": "[OFAI]ํ๊ตญ์ด ์์น-VLM", "url": "https://fantos-jinjavis.hf.space"},
{"name": "[OFAI]MS PHI 3.5 Vision ", "url": "https://aiqtech-phi35-vision.hf.space"},
{"name": "[OFAI]NSFW kAI ", "url": "https://fantaxy-ofai-kai.hf.space"},
{"name": "[OFAI]๋ฉํ LLAMA 3.1 405B ", "url": "https://seawolf2357-ofai-405.hf.space"},
{"name": "[OFAI]๋ฉํ LLAMA 3.1 70B ", "url": "https://fantaxy-ofai-70.hf.space"},
{"name": "[OFAI]๋ฉํ LLAMA 3.1 8B ", "url": "https://seawolf2357-ofai-8.hf.space"},
{"name": "[OFAI]๋ฏธ์คํธ๋ 7B Instruct v0.3 ", "url": "https://fantaxy-ofai-mis7b.hf.space"},
{"name": "[OFAI]MS Phi 3 mini 4k-instruct ", "url": "https://fantaxy-ofai-phi.hf.space"},
{"name": "[OFAI]์ค๊ตญ Yi 1.5 34B ", "url": "https://fantaxy-ofai-yi.hf.space"},
{"name": "[OFAI]๋ฏธ์คํธ๋ Mixtral 8X7B ", "url": "https://fantaxy-ofai-8x7b.hf.space"},
{"name": "[OFAI]๋ฏธ์คํธ๋ Nemo Instruct 2407 ", "url": "https://seawolf2357-ofai-mistral-nemo.hf.space"},
{"name": "[OFAI]๋ธ๋ก๊ทธ ์๋(์ปจํ/๋จ์) ์์ฑ ", "url": "https://fantaxy-blogger-send-webhook-confirm-image.hf.space"},
{"name": "[OFAI]๋ธ๋ก๊ทธ ์๋(๋ฌด์ธ/๋ณต์) ์์ฑ ", "url": "https://fantaxy-blogger-send-webhook-auto-image.hf.space"},
{"name": "[OFAI]์ ๋ฌธ ๋ธ๋ก๊ทธ ์์ฑ ", "url": "https://seawolf2357-ofai-jinjavis-blog.hf.space"},
{"name": "[OFAI]์ํ ์ ๋ฌธ ๋ธ๋ก๊ทธ ์์ฑ ", "url": "https://seawolf2357-ofai-jinjavis-blog-medi.hf.space"},
{"name": "[OFAI]์ฝ๋ฆฌํ ์ ๋ฌธ ๋ธ๋ก๊ทธ ์์ฑ ", "url": "https://seawolf2357-ofai-jinjavis-blog-pharm.hf.space"},
{"name": "[T+I2I] ๋ด ์ผ๊ตด ์ฌ์ง์ผ๋ก ์ด๋ฏธ์ง ์์ฑ III ", "url": "https://fantaxy-flx-pulid.hf.space"},
{"name": "[T2I] FLUX GIF ์์ฑ II ", "url": "https://fantaxy-flux-gif-animations-2.hf.space"},
{"name": "FLUX ์ด๋ฏธ์ง์์ฑ ํ์๋จธ์ ", "url": "https://ginipick-flx-timemach.hf.space"},
{"name": "FLUX ์ค์๊ฐ ์ด๋ฏธ์ง ์์ฑ ", "url": "https://ginipick-Realtime-FLUX.hf.space"},
{"name": "๋ด ์ฌ์ง์ผ๋ก ์ท ๊ฐ์์
ํ๊ธฐ ", "url": "https://aiqcamp-fash2.hf.space"},
{"name": "์ด๋ฏธ์ง ์ธ์์ผ๋ก FLUX ํ๋กฌํํธ ์์ฑ ", "url": "https://aiqcamp-flxcaptin.hf.space"},
{"name": "์์ฑ ๋ณต์ ํ๊ณ ํ
์คํธ๋ก ์์ฑ ์์ฑ ", "url": "https://aiqcamp-kovoicclon.hf.space"},
{"name": "์ด๋ฏธ์ง ๋ง์คํน+ํ๋กฌํํธ๋ก ์ด๋ฏธ์ง ๋ณํ", "url": "https://aiqtech-imaginpaint.hf.space"},
]
class MyModel(BaseModel):
request: Any
model_config = ConfigDict(arbitrary_types_allowed=True)
def check_url_status(url):
try:
response = requests.get(url, timeout=5)
if response.status_code == 200:
logging.info(f"URL ์ ์ ์ฑ๊ณต: {url}")
return "์ ์", "normal"
else:
logging.error(f"URL ์ ์ ์ค๋ฅ: {url}, ์ํ ์ฝ๋ {response.status_code}")
return f"๋น์ ์ (์ฝ๋: {response.status_code})", "abnormal"
except requests.exceptions.RequestException as e:
logging.exception(f"์๋ฒ์ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค: {url}")
return "์ฐ๊ฒฐ ๋ถ๊ฐ", "abnormal"
def update_status():
status_html = ""
for target in TARGETS:
status, status_class = check_url_status(target["url"])
status_html += f'<span class="status-button status-{status_class}">{target["name"]}: {status}</span>'
return status_html
def periodic_update():
while True:
time.sleep(60) # 60์ด ๋๊ธฐ
new_status = update_status()
gr.update(value=new_status)
def create_dashboard():
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as app:
gr.Image("banner.png", show_label=False)
gr.Markdown("# 24์๊ฐ ๋ชจ๋ํฐ๋ง ์์คํ
")
gr.Markdown("## \n")
status_html = gr.HTML()
refresh_button = gr.Button("์ํ ์๋ก๊ณ ์นจ")
refresh_button.click(fn=update_status, outputs=status_html)
app.load(fn=update_status, outputs=status_html)
threading.Thread(target=periodic_update, daemon=True).start()
return app
if __name__ == "__main__":
dashboard = create_dashboard()
dashboard.launch() |