Cachoups commited on
Commit
eec6b71
·
verified ·
1 Parent(s): aa47b88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -654,11 +654,11 @@ with gr.Blocks(theme='gradio/soft',js=js_func) as demo:
654
  df['Positive_ratio'] = df['Positive'] / df['Total_paragraphs']*100
655
  df['Negative_ratio'] = df['Negative'] / df['Total_paragraphs']*100
656
  df['Date'] = pd.to_datetime(df['Date'])
657
- start_date = str(df['Date'].min())
658
- end_date = str(df['Date'].max())
659
  with gr.Row():
660
- start = gr.DateTime(start_date, label="Start")
661
- end = gr.DateTime(end_date, label="End")
662
  apply_btn = gr.Button("Apply", scale=0)
663
  reset_btn = gr.Button("Reset", scale=0)
664
  # data_table = gr.DataFrame(value=df[['Date', 'Positive_ratio', 'Negative_ratio', 'Total_paragraphs']], label="Sentiment Data", height=500)
 
654
  df['Positive_ratio'] = df['Positive'] / df['Total_paragraphs']*100
655
  df['Negative_ratio'] = df['Negative'] / df['Total_paragraphs']*100
656
  df['Date'] = pd.to_datetime(df['Date'])
657
+ start_date = df['Date'].min()
658
+ end_date = df['Date'].max()
659
  with gr.Row():
660
+ start = gr.DateTime(str(start_date)+" 00:00:00", label="Start")
661
+ end = gr.DateTime(str(end_date)+" 00:00:00", label="End")
662
  apply_btn = gr.Button("Apply", scale=0)
663
  reset_btn = gr.Button("Reset", scale=0)
664
  # data_table = gr.DataFrame(value=df[['Date', 'Positive_ratio', 'Negative_ratio', 'Total_paragraphs']], label="Sentiment Data", height=500)