Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,9 @@ footer { visibility: hidden; }
|
|
15 |
padding: 5px 10px;
|
16 |
margin: 5px;
|
17 |
border-radius: 5px;
|
18 |
-
font-size: 12px
|
19 |
-
|
|
|
20 |
|
21 |
# ๋ชจ๋ํฐ๋ง ๋์ ๋ชฉ๋ก
|
22 |
TARGETS = [
|
@@ -101,22 +102,10 @@ TARGETS = [
|
|
101 |
{"name": "[HUGPU]์ฝ๋ฆฌํ ์ ๋ฌธ ๋ธ๋ก๊ทธ ์์ฑ ", "url": "https://seawolf2357-ofai-jinjavis-blog-pharm.hf.space"},
|
102 |
|
103 |
]
|
104 |
-
|
105 |
-
def request_model_schema():
|
106 |
-
return {
|
107 |
-
'type': 'object',
|
108 |
-
'properties': {
|
109 |
-
'url': {'type': 'string', 'format': 'uri'},
|
110 |
-
'method': {'type': 'string'}
|
111 |
-
}
|
112 |
-
}
|
113 |
|
114 |
class MyModel(BaseModel):
|
115 |
-
request:
|
116 |
-
|
117 |
-
@classmethod
|
118 |
-
def __get_pydantic_core_schema__(cls, *args, **kwargs):
|
119 |
-
return request_model_schema()
|
120 |
|
121 |
# URL ์ํ ํ์ธ ํจ์
|
122 |
def check_url_status(url):
|
@@ -169,4 +158,4 @@ def create_dashboard():
|
|
169 |
|
170 |
if __name__ == "__main__":
|
171 |
dashboard = create_dashboard()
|
172 |
-
dashboard.launch()
|
|
|
15 |
padding: 5px 10px;
|
16 |
margin: 5px;
|
17 |
border-radius: 5px;
|
18 |
+
font-size: 12px;
|
19 |
+
}
|
20 |
+
""" # CSS์์ ๋ซ๋ ์ค๊ดํธ ์ถ๊ฐ
|
21 |
|
22 |
# ๋ชจ๋ํฐ๋ง ๋์ ๋ชฉ๋ก
|
23 |
TARGETS = [
|
|
|
102 |
{"name": "[HUGPU]์ฝ๋ฆฌํ ์ ๋ฌธ ๋ธ๋ก๊ทธ ์์ฑ ", "url": "https://seawolf2357-ofai-jinjavis-blog-pharm.hf.space"},
|
103 |
|
104 |
]
|
105 |
+
RequestModel = create_model('RequestModel', url=(str, ...), method=(str, ...))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
class MyModel(BaseModel):
|
108 |
+
request: RequestModel
|
|
|
|
|
|
|
|
|
109 |
|
110 |
# URL ์ํ ํ์ธ ํจ์
|
111 |
def check_url_status(url):
|
|
|
158 |
|
159 |
if __name__ == "__main__":
|
160 |
dashboard = create_dashboard()
|
161 |
+
dashboard.launch()
|