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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -4,6 +4,7 @@ from datasets import load_dataset
4
  import pandas as pd
5
  import matplotlib.pyplot as plt
6
  import argilla as rg
 
7
 
8
 
9
  ARGILLA_API_URL = os.environ.get("ARGILLA_API_URL")
@@ -24,6 +25,12 @@ ds = load_dataset("CohereForAI/mmlu-translations-results", split="train", token=
24
  df = ds.to_pandas()
25
 
26
  st.title("MMLU Translations Progress")
 
 
 
 
 
 
27
 
28
  # Extract the language from the metadata column and create a new column
29
  df['language'] = df['metadata'].apply(lambda x: x.get('language'))
 
4
  import pandas as pd
5
  import matplotlib.pyplot as plt
6
  import argilla as rg
7
+ from datetime import datetime
8
 
9
 
10
  ARGILLA_API_URL = os.environ.get("ARGILLA_API_URL")
 
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'))