Spaces:
Sleeping
Sleeping
import gradio as gr | |
import requests | |
import threading | |
import time | |
# μΈλΆ URLμ μ μνλ ν¨μλ₯Ό μ μν©λλ€. | |
def check_connection(url): | |
try: | |
response = requests.get(url) | |
status = f"URL: {url} μν μ½λ: {response.status_code}, μ μ μν: {'μ μ μ±κ³΅' if response.status_code == 200 else 'μ μ μ€ν¨'}" | |
except Exception as e: | |
status = f"URL: {url} μ μ μ€ν¨: {str(e)}" | |
print(status) | |
return status | |
# νμ΄λ¨Έλ₯Ό μ¬μ©νμ¬ μ ν΄μ§ μ£ΌκΈ°λ‘ ν¨μλ₯Ό λ°λ³΅ μ€νν©λλ€. | |
def start_timer(url, interval): | |
threading.Timer(interval, start_timer, [url, interval]).start() | |
check_connection(url) | |
# νμ΄λ¨Έ μμ ν¨μλ₯Ό Gradioμ μ λ ₯κ³Ό ν¨κ» μ°κ²°ν©λλ€. | |
def setup_timer(interval, *urls): | |
interval_seconds = interval * 60 # λΆμ μ΄λ‘ λ³ν | |
for url in urls: | |
if url: # URLμ΄ λΉμ΄ μμ§ μμΌλ©΄ νμ΄λ¨Έ μμ | |
start_timer(url, interval_seconds) | |
return "νμ΄λ¨Έκ° μ€μ λμμ΅λλ€." | |
# Gradio UI μ»΄ν¬λνΈλ₯Ό μ μν©λλ€. | |
url_inputs = [gr.Text(label=f"URL {i+1}", placeholder=f"μ μν URL {i+1}μ μ λ ₯νμΈμ") for i in range(40)] | |
interval_input = gr.Slider(minimum=1, maximum=60, step=1, value=15, label="μ μ μ£ΌκΈ°(λΆ)") | |
# Gradio μ± μ€μ | |
app = gr.Interface( | |
fn=setup_timer, | |
inputs=[interval_input] + url_inputs, | |
outputs="text", | |
title="URL μ μ 체컀", | |
description="μ΅λ 40κ°μ URLκ³Ό μ μ μ£ΌκΈ°λ₯Ό μ λ ₯νκ³ 'μμ' λ²νΌμ ν΄λ¦νμΈμ. μ§μ λ μ£ΌκΈ°λ‘ HTTP μν μ½λ λ° μ μ μνλ₯Ό νμΈν©λλ€.", | |
examples=[ | |
[ | |
15, | |
"https://seawolf2357-timer-new2.hf.space", | |
"https://seawolf2357-kai-allsend.hf.space", # κ΄λ¦¬μ λ©λ΄μμ μ 체 μ±λμ κ³΅μ§ μ μ‘νλ | |
"https://seawolf2357-kai-flx.hf.space", #λμ€μ½λ-openfreeai-kai νλμ€ μ΄λ―Έμ§ μμ±-μ±λ: ???? | |
"https://fantaxy-erotica.hf.space", | |
"https://ginipick-selenium-screenshot-gradio.hf.space", #μλκ²μ λν api μλ² μν μ΄λ€ | |
"https://ginipick-spacepick.hf.space", | |
"https://fantaxy-eroko.hf.space", | |
"https://ginipick-mouse-hf.hf.space", | |
"https://openfree-news.hf.space", | |
"https://ginipick-myezrag.hf.space", | |
"https://openfree-mouse.hf.space", | |
"https://openfree-gallery.hf.space", #λμ€μ½λ-openfreeai-μ¬μ§ κ²μ-μ±λ: 1254293946679431218 | |
"https://VIDraft-mouse.hf.space", #λμ€μ½λ-openfreeai-λΉλμ€ κ²μ-μ±λ: 1254294089449341061 | |
"https://VIDraft-mouse1.hf.space", #λμ€μ½λ-openfreeai-110κ° μΈμ΄ λ²μ-μ±λ: 1252511288450351134 | |
"https://fantaxy-kai-llm-chat.hf.space", #λμ€μ½λ-openfreeai-kai μ±λ΄-μ±λ: 1228393183700844687 | |
"https://fantaxy-kai-llm-chat-speech.hf.space", #λμ€μ½λ-openfreeai-kai μ±λ΄ μμ±-μ±λ: 1254268258580959282 | |
"https://seawolf2357-kai-llm-search.hf.space", #λμ€μ½λ-openfreeai-kai μμΉ gpt-μ±λ: 1267341708165910559 | |
"https://seawolf2357-kai-llm-medi.hf.space", #λμ€μ½λ-openfreeai-kai μν-μ±λ: 1266268642278899753 | |
"https://seawolf2357-kai-llm-pharm.hf.space", #λμ€μ½λ-openfreeai-kai μ½λ¦¬ν-μ±λ: 1266295375199998026 | |
"https://seawolf2357-kai-llm-insu.hf.space", #λμ€μ½λ-openfreeai-kai μ’ ν©λ³΄ν-μ±λ: 1266960452517232722 | |
"https://seawolf2357-kai-llm-medi.hf.space", #λμ€μ½λ-openfreeai-kai νλ₯΄μλ-μ±λ: 1262218748044247192 | |
"https://seawolf2357-kai-llm-pharm.hf.space", #λμ€μ½λ-openfreeai-kai λΈλ‘κ·Έ-μ±λ: 1252068313023123526 | |
"https://seawolf2357-kai-llm-insu.hf.space", #λμ€μ½λ-openfreeai-kai μ-μ±λ: 1260158278000971849 | |
"https://ginipick-kai-llm-law1.hf.space", #λμ€μ½λ-openfreeai-kai λ²λ₯ 1-μ±λ: 1252828517247221770 | |
"https://seawolf2357-kai-paper.hf.space", #λμ€μ½λ-openfreeai-kai λ Όλ¬Έ-μ±λ: 1254748597556220034 | |
"https://seawolf2357-kai-llm-copy.hf.space", #λμ€μ½λ-openfreeai-kai κ΄κ³ /ν보-μ±λ: 1267415982578864184 | |
"https://seawolf2357-kai-bodo.hf.space", #λμ€μ½λ-openfreeai-kai 보λμλ£-μ±λ: 1258695707137802250 | |
"https://fantaxy-kai-tts.hf.space", #λμ€μ½λ-openfreeai-kai 50κ° μΈμ΄ ν΅μ-μ±λ: 1252461996012474389 | |
"https://seawolf2357-kai-sum.hf.space", #λμ€μ½λ-openfreeai-kai μμ½-μ±λ: 1252518410936651838 | |
"https://seawolf2357-kai-code.hf.space", #λμ€μ½λ-openfreeai-kai μ½λνμΌλΏ-μ±λ: 1252451768252502119 | |
"https://seawolf2357-kai-l3-405b.hf.space", #λμ€μ½λ-openfreeai-kai λΌλ§3.1 405b(NVIDIA API)-μ±λ: 1265471751748321432 | |
"https://seawolf2357-kai-l3-70b.hf.space", #λμ€μ½λ-openfreeai-kai λΌλ§3.1 70b-μ±λ: 1252455231577657386 | |
"https://seawolf2357-kai-l3-8b.hf.space", #λμ€μ½λ-openfreeai-kai μμ½-μ±λ: 1252455268516630638 | |
"https://seawolf2357-kai-llm-mislarge2.hf.space", #λμ€μ½λ-openfreeai-kai λ―Έμ€νΈλ λΌμ§2-μ±λ: 1266182774977462322 | |
"https://seawolf2357-kai-llm-claude35.hf.space", #λμ€μ½λ-openfreeai-kai μμ½-μ±λ: 1258788280334422077 | |
"https://seawolf2357-kai-llm-gpt4o.hf.space", #λμ€μ½λ-openfreeai-kai μμ½-μ±λ: 1258794302482677792 | |
"https://seawolf2357-kai-llm-upstage.hf.space", #λμ€μ½λ-openfreeai-kai μμ½-μ±λ: 1252644759470866442 | |
"https://fantos-tango2.hf.space", #μν₯ μμ± api μλ²(zero gpu) | |
"https://seawolf2357-kai-math.hf.space" #λμ€μ½λ-λ―Έ νμ ??? | |
] | |
], | |
cache_examples=False # μΊμ λΉνμ±ν | |
) | |
app.launch() | |