Petr Tsvetkov commited on
Commit
221db9e
1 Parent(s): 7dd87f6

Increase timestamp capture precision

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -131,7 +131,7 @@ with gr.Blocks(theme=gr.themes.Soft(), head=head_html, css="style_overrides.css"
131
  container=True, show_label=False)
132
  now_timestamp = gr.Textbox(info="Current time",
133
  interactive=False, container=True, show_label=False,
134
- value=lambda: datetime.now().isoformat(), every=1.0,
135
  label='submitted_ts')
136
 
137
  commit_view = [
@@ -182,6 +182,7 @@ with gr.Blocks(theme=gr.themes.Soft(), head=head_html, css="style_overrides.css"
182
  for i, s in enumerate(ndiff(prev_message, message)):
183
  diff = char_diff_obj(s[0], i, s[-1], timestamp)
184
  if diff['type'] in ('+', '-'):
 
185
  history.append(diff)
186
  return message, history
187
 
 
131
  container=True, show_label=False)
132
  now_timestamp = gr.Textbox(info="Current time",
133
  interactive=False, container=True, show_label=False,
134
+ value=lambda: datetime.now().isoformat(), every=0.1,
135
  label='submitted_ts')
136
 
137
  commit_view = [
 
182
  for i, s in enumerate(ndiff(prev_message, message)):
183
  diff = char_diff_obj(s[0], i, s[-1], timestamp)
184
  if diff['type'] in ('+', '-'):
185
+ print(diff)
186
  history.append(diff)
187
  return message, history
188