dvilasuero HF staff commited on
Commit
d1e562c
1 Parent(s): 6609394

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -25,12 +25,18 @@ ds = load_dataset("CohereForAI/mmlu-translations-results", split="train", token=
25
  df = ds.to_pandas()
26
 
27
  st.title("MMLU Translations Progress")
28
- # Get the current time and round down to the top of the hour
 
 
 
29
  now = datetime.now()
30
  top_of_the_hour = now.replace(minute=0, second=0, microsecond=0)
31
 
32
- # Display the timestamp in markdown format
33
- st.markdown(f"**Last updated:** {top_of_the_hour.strftime('%Y-%m-%d %H:%M')}")
 
 
 
34
 
35
  # Extract the language from the metadata column and create a new column
36
  df['language'] = df['metadata'].apply(lambda x: x.get('language'))
 
25
  df = ds.to_pandas()
26
 
27
  st.title("MMLU Translations Progress")
28
+
29
+ st.markdown(f"**Total tasks completed:** {len(ds)}")
30
+
31
+ # Get the current local time
32
  now = datetime.now()
33
  top_of_the_hour = now.replace(minute=0, second=0, microsecond=0)
34
 
35
+ # Calculate the minutes past the top of the hour
36
+ minutes_past = (now - top_of_the_hour).seconds // 60
37
+
38
+ # Display the time as X minutes ago
39
+ st.markdown(f"**Last updated:** {minutes_past} minutes ago")
40
 
41
  # Extract the language from the metadata column and create a new column
42
  df['language'] = df['metadata'].apply(lambda x: x.get('language'))