IAMJB commited on
Commit
054ceea
·
1 Parent(s): 1a22124

date in request

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -373,11 +373,16 @@ with gr.Blocks(css="style.css") as demo:
373
  Returns:
374
  str: The echoed text.
375
  """
 
376
  if request:
377
  print("Request headers dictionary:", dict(request.headers))
378
  print("IP address:", request.client.host)
379
  print("Query parameters:", dict(request.query_params))
380
  print("Session hash:", request.session_hash)
 
 
 
 
381
 
382
 
383
  demo.load(
@@ -387,6 +392,7 @@ with gr.Blocks(css="style.css") as demo:
387
  api_name=False,
388
  ).then(
389
  fn=echo,
 
390
  )
391
 
392
 
 
373
  Returns:
374
  str: The echoed text.
375
  """
376
+ calendar = gr.update()
377
  if request:
378
  print("Request headers dictionary:", dict(request.headers))
379
  print("IP address:", request.client.host)
380
  print("Query parameters:", dict(request.query_params))
381
  print("Session hash:", request.session_hash)
382
+ if 'date' in request.query_params:
383
+ calendar = gr.update(value=request.query_params['date'])
384
+
385
+ return calendar
386
 
387
 
388
  demo.load(
 
392
  api_name=False,
393
  ).then(
394
  fn=echo,
395
+ outputs=[calendar]
396
  )
397
 
398