IAMJB commited on
Commit
ba9c2b3
·
1 Parent(s): dbdfc66

paper_from

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -515,6 +515,7 @@ with gr.Blocks(css_paths="style.css") as demo:
515
  hf_options = gr.update(value=[])
516
  selected_tab = gr.Tabs()
517
  paper_id = gr.update(value=None)
 
518
  tab_chat_paper = gr.update(visible=False)
519
 
520
  if request:
@@ -555,8 +556,9 @@ with gr.Blocks(css_paths="style.css") as demo:
555
  if "paper_id" in request.query_params:
556
  paper_id = request.query_params['paper_id']
557
  tab_chat_paper = gr.update(visible=True)
 
558
 
559
- return calendar, date_range, conferences, hf_options, selected_tab, paper_id, tab_chat_paper
560
 
561
 
562
  demo.load(
@@ -566,7 +568,7 @@ with gr.Blocks(css_paths="style.css") as demo:
566
  api_name="update_data",
567
  ).then(
568
  fn=echo,
569
- outputs=[calendar, date_range_radio, conference_options, hf_options, tabs, arxiv_id, tab_chat_paper],
570
  api_name=False,
571
  ).then(
572
  # New then to handle LoginButton and HTML components
@@ -581,7 +583,7 @@ def main():
581
  """
582
  Launches the Gradio app.
583
  """
584
- demo.launch(ssr_mode=False, share=True)
585
 
586
 
587
  # Run the main function when the script is executed
 
515
  hf_options = gr.update(value=[])
516
  selected_tab = gr.Tabs()
517
  paper_id = gr.update(value=None)
518
+ paper_from = gr.update(value=None)
519
  tab_chat_paper = gr.update(visible=False)
520
 
521
  if request:
 
556
  if "paper_id" in request.query_params:
557
  paper_id = request.query_params['paper_id']
558
  tab_chat_paper = gr.update(visible=True)
559
+ paper_from = request.query_params['paper_from']
560
 
561
+ return calendar, date_range, conferences, hf_options, selected_tab, paper_id, paper_from, tab_chat_paper
562
 
563
 
564
  demo.load(
 
568
  api_name="update_data",
569
  ).then(
570
  fn=echo,
571
+ outputs=[calendar, date_range_radio, conference_options, hf_options, tabs, arxiv_id, paper_from, tab_chat_paper],
572
  api_name=False,
573
  ).then(
574
  # New then to handle LoginButton and HTML components
 
583
  """
584
  Launches the Gradio app.
585
  """
586
+ demo.launch(ssr_mode=False)
587
 
588
 
589
  # Run the main function when the script is executed