crcdng commited on
Commit
14bf86e
·
1 Parent(s): 8d0441f

local time

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +3 -3
Gradio_UI.py CHANGED
@@ -25,6 +25,7 @@ from smolagents.agents import ActionStep, MultiStepAgent
25
  from smolagents.memory import MemoryStep
26
  from smolagents.utils import _is_package_available
27
 
 
28
 
29
  def pull_messages_from_step(
30
  step_log: MemoryStep,
@@ -291,9 +292,8 @@ class GradioUI:
291
  with gr.Row():
292
  timer = gr.Timer(1)
293
  time_display = gr.Textbox(label="Time", every=timer)
294
- import datetime
295
- from zoneinfo import ZoneInfo
296
- timer.tick(lambda: datetime.datetime.now(tz=ZoneInfo("Europe/Berlin")), outputs=time_display)
297
  with gr.Row():
298
  title=gr.HTML(title_html)
299
  with gr.Row():
 
25
  from smolagents.memory import MemoryStep
26
  from smolagents.utils import _is_package_available
27
 
28
+ from app.py import get_current_time_in_timezone
29
 
30
  def pull_messages_from_step(
31
  step_log: MemoryStep,
 
292
  with gr.Row():
293
  timer = gr.Timer(1)
294
  time_display = gr.Textbox(label="Time", every=timer)
295
+ import time
296
+ timer.tick(lambda: get_current_time_in_timezone(time.tzname[0]), outputs=time_display)
 
297
  with gr.Row():
298
  title=gr.HTML(title_html)
299
  with gr.Row():