Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -166,23 +166,39 @@ with gr.Blocks() as app:
|
|
| 166 |
timestamp=datestamp[3].split(":")
|
| 167 |
time_html=gr.HTML(f"""<div style='font-size:xxx-large;'>Current: {datetimestamp} UTC</div>""")
|
| 168 |
|
| 169 |
-
with gr.
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
-
|
| 185 |
-
app.load(get_time,None,[time_html]).then(make_tree,None,drop1)
|
| 186 |
load_btn.click(load_json,[drop1,drop2,drop3,drop4,drop5,drop6,drop7,drop8],[html_raw,links])
|
| 187 |
|
| 188 |
drop1.change(make_tree,drop1,[drop2])
|
|
|
|
| 166 |
timestamp=datestamp[3].split(":")
|
| 167 |
time_html=gr.HTML(f"""<div style='font-size:xxx-large;'>Current: {datetimestamp} UTC</div>""")
|
| 168 |
|
| 169 |
+
with gr.Row():
|
| 170 |
+
gr.Markdown("<h5 style='font-size:xx-large;'>From:")
|
| 171 |
+
year1=gr.Number(label="Year",minimum=2000,maximum=2025,precision=0,value=int(datestamp[0]),min_width=10)
|
| 172 |
+
month1=gr.Number(label="Month",minimum=1,maximum=12,precision=0,value=int(datestamp[1]),min_width=10)
|
| 173 |
+
day1=gr.Number(label="Day",minimum=1,maximum=31,precision=0,value=int(datestamp[2]),min_width=10)
|
| 174 |
+
hour1=gr.Number(label="Hour",minimum=0,maximum=23,precision=0,value=int(timestamp[0]),min_width=10)
|
| 175 |
+
minute1=gr.Number(label="Minute",minimum=0,maximum=59,precision=0,value=int(timestamp[1]),min_width=10)
|
| 176 |
+
gr.Markdown("<h5 style='font-size:xx-large;'>To:")
|
| 177 |
+
year2=gr.Number(label="Year",minimum=2000,maximum=2025,precision=0,value=int(datestamp[0]),min_width=10)
|
| 178 |
+
month2=gr.Number(label="Month",minimum=1,maximum=12,precision=0,value=int(datestamp[1]),min_width=10)
|
| 179 |
+
day2=gr.Number(label="Day",minimum=1,maximum=31,precision=0,value=int(datestamp[2]),min_width=10)
|
| 180 |
+
hour2=gr.Number(label="Hour",minimum=0,maximum=23,precision=0,value=int(timestamp[0]),min_width=10)
|
| 181 |
+
minute2=gr.Number(label="Minute",minimum=0,maximum=59,precision=0,value=int(timestamp[1]),min_width=10)
|
| 182 |
+
|
| 183 |
+
with gr.Row():
|
| 184 |
+
sdo_drop1=gr.Dropdown(label="Instrument", multiselect=True, choices=["All"]+sdo_obj, value="0094")
|
| 185 |
+
sdo_drop2=gr.Dropdown(label="Size", multiselect=True, choices=["All"]+sdo_size,value=512)
|
| 186 |
+
with gr.Row():
|
| 187 |
+
drop1=gr.Dropdown()
|
| 188 |
+
drop2=gr.Dropdown()
|
| 189 |
+
drop3=gr.Dropdown()
|
| 190 |
+
drop4=gr.Dropdown()
|
| 191 |
+
with gr.Row():
|
| 192 |
+
drop5=gr.Dropdown()
|
| 193 |
+
drop6=gr.Dropdown()
|
| 194 |
+
drop7=gr.Dropdown()
|
| 195 |
+
drop8=gr.Dropdown()
|
| 196 |
+
load_btn=gr.Button("Load")
|
| 197 |
+
html_raw=gr.HTML()
|
| 198 |
+
links=gr.JSON()
|
| 199 |
|
| 200 |
+
app.load(get_time,None,[time_html,year1,month1,day1,hour1,minute1,year2,month2,day2,hour2,minute2]).then(make_tree,None,drop1)
|
| 201 |
+
#app.load(get_time,None,[time_html]).then(make_tree,None,drop1)
|
| 202 |
load_btn.click(load_json,[drop1,drop2,drop3,drop4,drop5,drop6,drop7,drop8],[html_raw,links])
|
| 203 |
|
| 204 |
drop1.change(make_tree,drop1,[drop2])
|