Karthikeyan commited on
Commit
792c8f6
·
1 Parent(s): 44cc032

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -23
app.py CHANGED
@@ -645,29 +645,28 @@ class KeyValueExtractor:
645
  fn=self.company_names,
646
  cache_examples=True,
647
  )
648
- with gr.Accordion("Get Summary for Last Day", open = False):
649
- with gr.Row(elem_id="col-container"):
650
- with gr.Column(scale=1.0, min_width=150):
651
- analyse_summary_for_finance = gr.Button("Analyse")
652
- with gr.Row(elem_id="col-container"):
653
- with gr.Column(scale=1, min_width=150):
654
- result_summary = gr.Textbox(label="Summary", lines = 10)
655
- with gr.Row(elem_id="col-container"):
656
- with gr.Column(scale=0.50, min_width=0):
657
- key_value_pair_result = gr.Textbox(label="Key Value Pair", lines = 10)
658
- with gr.Column(scale=0.50, min_width=0):
659
- plot_for_one_day =gr.Plot(label="Sentiment", size=(500, 500))
660
-
661
- with gr.Accordion("Get Summary for One Year", open = False):
662
- with gr.Row(elem_id="col-container"):
663
- with gr.Column(scale=1.0, min_width=150):
664
- one_year = gr.Button("Analyse One Year Summary and Analyse Sentiment ")
665
- with gr.Row(elem_id="col-container"):
666
- with gr.Column(scale=1.0, min_width=150, ):
667
- one_year_summary = gr.Textbox(label="Summary Of One Year Perfomance",lines = 20)
668
- with gr.Column(scale=1.0, min_width=0):
669
- plot_for_year =gr.Plot(label="Sentiment", size=(500, 500))
670
-
671
 
672
  analyse_summary_for_finance.click(self.main_for_finance_tool, input_news, [result_summary,key_value_pair_result,plot_for_one_day])
673
  one_year.click(self.one_year_summary_for_finance,input_news,[one_year_summary,plot_for_year])
 
645
  fn=self.company_names,
646
  cache_examples=True,
647
  )
648
+ with gr.Tabs():
649
+ with gr.TabItem("Last Day Analysis"):
650
+ with gr.Row(elem_id="col-container"):
651
+ with gr.Column(scale=1.0, min_width=150):
652
+ analyse_summary_for_finance = gr.Button("Analyse")
653
+ with gr.Row(elem_id="col-container"):
654
+ with gr.Column(scale=1, min_width=150):
655
+ result_summary = gr.Textbox(label="Summary", lines = 10)
656
+ with gr.Row(elem_id="col-container"):
657
+ with gr.Column(scale=0.50, min_width=0):
658
+ key_value_pair_result = gr.Textbox(label="Key Value Pair", lines = 10)
659
+ with gr.Column(scale=0.50, min_width=0):
660
+ plot_for_one_day =gr.Plot(label="Sentiment", size=(500, 500))
661
+ with gr.TabItem("One Year Analyis"):
662
+ with gr.Row(elem_id="col-container"):
663
+ with gr.Column(scale=1.0, min_width=150):
664
+ one_year = gr.Button("Analyse One Year Summary and Analyse Sentiment ")
665
+ with gr.Row(elem_id="col-container"):
666
+ with gr.Column(scale=1.0, min_width=150, ):
667
+ one_year_summary = gr.Textbox(label="Summary Of One Year Perfomance",lines = 20)
668
+ with gr.Column(scale=1.0, min_width=0):
669
+ plot_for_year =gr.Plot(label="Sentiment", size=(500, 500))
 
670
 
671
  analyse_summary_for_finance.click(self.main_for_finance_tool, input_news, [result_summary,key_value_pair_result,plot_for_one_day])
672
  one_year.click(self.one_year_summary_for_finance,input_news,[one_year_summary,plot_for_year])