seawolf2357 commited on
Commit
7cec7f1
ยท
verified ยท
1 Parent(s): 6f3d99c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -17
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: 'RequestModel'
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()