Elfsong commited on
Commit
b92f011
·
verified ·
1 Parent(s): be2b9eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,7 +33,7 @@ def get_time_remaining(last_start_timestamp, run_duration_seconds):
33
  last_start_dt = parser.isoparse(last_start_timestamp)
34
  end_run_dt = last_start_dt + timedelta(seconds=run_duration_seconds)
35
  now_dt = datetime.now(tz=last_start_dt.tzinfo)
36
- delta = int((end_run_dt - now_dt).total_seconds())
37
  return max(delta, 0)
38
 
39
  def get_server(credentials, instance_name):
@@ -88,7 +88,7 @@ if status == 'TERMINATED':
88
  activate_response = activate_server(credentials, instance_name)
89
  elif status == 'RUNNING':
90
  st.write(f"You can access Lucky Reactor via http://{ip_address}:7860")
91
- st.write(f'The reactor can still run **{max_remaining_time}** s. You can terminate it in advance.')
92
 
93
  with st.form("deactivate_form"):
94
  token = st.text_input("Token")
 
33
  last_start_dt = parser.isoparse(last_start_timestamp)
34
  end_run_dt = last_start_dt + timedelta(seconds=run_duration_seconds)
35
  now_dt = datetime.now(tz=last_start_dt.tzinfo)
36
+ delta = int((end_run_dt - now_dt).total_seconds() / 60)
37
  return max(delta, 0)
38
 
39
  def get_server(credentials, instance_name):
 
88
  activate_response = activate_server(credentials, instance_name)
89
  elif status == 'RUNNING':
90
  st.write(f"You can access Lucky Reactor via http://{ip_address}:7860")
91
+ st.write(f'The reactor can still run **{max_remaining_time}** minutes. You can terminate it in advance.')
92
 
93
  with st.form("deactivate_form"):
94
  token = st.text_input("Token")