Pijush2023 commited on
Commit
0d8d992
·
verified ·
1 Parent(s): a0658e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -650,6 +650,23 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
650
  gr.Markdown("<h1>Locate the Events</h1>", elem_id="location-markdown")
651
  location_output = gr.HTML()
652
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  # with gr.Column():
654
  # gr.Markdown("<h1>Listen to the audio</h1>", elem_id="audio-markdown")
655
  # audio_output = gr.Audio()
 
650
  gr.Markdown("<h1>Locate the Events</h1>", elem_id="location-markdown")
651
  location_output = gr.HTML()
652
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
653
+
654
+ with gr.Row():
655
+ with gr.Column():
656
+ gr.Markdown("<h1>Current Date and Time</h1>", elem_id="datetime-markdown")
657
+ datetime_output = gr.HTML('<div id="datetime"></div>')
658
+ datetime_output.load("", "", _js="""
659
+ function(el) {
660
+ function updateTime() {
661
+ var now = new Date();
662
+ var options = { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit' };
663
+ var formattedDate = now.toLocaleDateString('en-US', options);
664
+ el.innerHTML = formattedDate;
665
+ }
666
+ setInterval(updateTime, 1000);
667
+ }
668
+ """)
669
+
670
  # with gr.Column():
671
  # gr.Markdown("<h1>Listen to the audio</h1>", elem_id="audio-markdown")
672
  # audio_output = gr.Audio()