Eran Fainman
commited on
Commit
·
f3e6dfe
1
Parent(s):
bfae658
fake results
Browse files
app.py
CHANGED
@@ -1,4 +1,25 @@
|
|
|
|
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
x = st.slider('Select a value')
|
4 |
-
st.write(x, 'squared is', x * x)
|
|
|
1 |
+
import os
|
2 |
+
import pandas as pd
|
3 |
import streamlit as st
|
4 |
+
import huggingface_hub as hh
|
5 |
+
|
6 |
+
st.set_page_config(page_title="RecTour2024 - Booking.com Review Ranking Challenge Leaderboard", layout="wide")
|
7 |
+
st.title("RecTour2024 Leaderboard")
|
8 |
+
|
9 |
+
# read files from HF
|
10 |
+
RESULTS_REPO = "Booking-com/results"
|
11 |
+
TOKEN = os.environ.get("HF_TOKEN")
|
12 |
+
CACHE_PATH = os.getenv("HF_HOME", ".")
|
13 |
+
EVAL_RESULTS_PATH = os.path.join(CACHE_PATH, "eval-results")
|
14 |
+
|
15 |
+
API = hh.HfApi(token=TOKEN)
|
16 |
+
|
17 |
+
hh.snapshot_download(
|
18 |
+
repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30,
|
19 |
+
token=TOKEN
|
20 |
+
)
|
21 |
+
|
22 |
+
df_results = pd.read_csv(os.path.join(EVAL_RESULTS_PATH, 'results.csv'))
|
23 |
+
st.table(df_results)
|
24 |
+
|
25 |
|
|
|
|