Spaces:
Running
Running
minor change
Browse files
app.py
CHANGED
|
@@ -64,7 +64,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 64 |
hf_options = gr.CheckboxGroup(
|
| 65 |
label="Hugging Face options",
|
| 66 |
choices=["🤗 paper-page", "datasets", "models", "spaces", "github"],
|
| 67 |
-
value=[
|
| 68 |
elem_id="hf_options"
|
| 69 |
)
|
| 70 |
|
|
@@ -375,6 +375,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 375 |
"""
|
| 376 |
calendar = gr.update()
|
| 377 |
conferences = gr.update()
|
|
|
|
| 378 |
|
| 379 |
if request:
|
| 380 |
print("Request headers dictionary:", dict(request.headers))
|
|
@@ -383,6 +384,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 383 |
print("Session hash:", request.session_hash)
|
| 384 |
if 'date' in request.query_params:
|
| 385 |
calendar = gr.update(value=request.query_params['date'])
|
|
|
|
| 386 |
if 'conferences' in request.query_params:
|
| 387 |
conferences = request.query_params['conferences']
|
| 388 |
try:
|
|
@@ -390,7 +392,18 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 390 |
except ValueError:
|
| 391 |
conferences = []
|
| 392 |
|
| 393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 394 |
|
| 395 |
|
| 396 |
demo.load(
|
|
@@ -400,7 +413,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 400 |
api_name=False,
|
| 401 |
).then(
|
| 402 |
fn=echo,
|
| 403 |
-
outputs=[calendar, conference_options]
|
| 404 |
)
|
| 405 |
|
| 406 |
|
|
|
|
| 64 |
hf_options = gr.CheckboxGroup(
|
| 65 |
label="Hugging Face options",
|
| 66 |
choices=["🤗 paper-page", "datasets", "models", "spaces", "github"],
|
| 67 |
+
value=[],
|
| 68 |
elem_id="hf_options"
|
| 69 |
)
|
| 70 |
|
|
|
|
| 375 |
"""
|
| 376 |
calendar = gr.update()
|
| 377 |
conferences = gr.update()
|
| 378 |
+
hf_options = gr.update()
|
| 379 |
|
| 380 |
if request:
|
| 381 |
print("Request headers dictionary:", dict(request.headers))
|
|
|
|
| 384 |
print("Session hash:", request.session_hash)
|
| 385 |
if 'date' in request.query_params:
|
| 386 |
calendar = gr.update(value=request.query_params['date'])
|
| 387 |
+
|
| 388 |
if 'conferences' in request.query_params:
|
| 389 |
conferences = request.query_params['conferences']
|
| 390 |
try:
|
|
|
|
| 392 |
except ValueError:
|
| 393 |
conferences = []
|
| 394 |
|
| 395 |
+
print(conferences)
|
| 396 |
+
conferences = gr.update(value=conferences)
|
| 397 |
+
|
| 398 |
+
if "hf_options" in request.query_params:
|
| 399 |
+
hf_options = request.query_params['hf_options']
|
| 400 |
+
try:
|
| 401 |
+
hf_options = [value for value in hf_options.split(',')]
|
| 402 |
+
except ValueError:
|
| 403 |
+
hf_options = []
|
| 404 |
+
hf_options = gr.update(value=hf_options)
|
| 405 |
+
|
| 406 |
+
return calendar, conferences, hf_options
|
| 407 |
|
| 408 |
|
| 409 |
demo.load(
|
|
|
|
| 413 |
api_name=False,
|
| 414 |
).then(
|
| 415 |
fn=echo,
|
| 416 |
+
outputs=[calendar, conference_options, hf_options]
|
| 417 |
)
|
| 418 |
|
| 419 |
|