Spaces:
Runtime error
Runtime error
add uid
Browse files
app.py
CHANGED
@@ -232,7 +232,7 @@ def get_next_update():
|
|
232 |
def leaderboard_data(show_stale: bool, scores: typing.Dict[int, typing.Dict[str, typing.Optional[float | str]]], competition_id: str):
|
233 |
value = [
|
234 |
[
|
235 |
-
f'[{c.namespace}/{c.name} ({c.commit[0:8]})](https://huggingface.co/{c.namespace}/{c.name}/commit/{c.commit})',
|
236 |
format_score(c.uid, scores, "win_rate"),
|
237 |
format_score(c.uid, scores, "perplexity"),
|
238 |
format_score(c.uid, scores, "weight"),
|
@@ -257,7 +257,7 @@ with demo:
|
|
257 |
scores = competition_scores[competition.id]
|
258 |
|
259 |
gr.Label(
|
260 |
-
value={ f"{c.namespace}/{c.name} ({c.commit[0:8]}) · ${round(c.emission * tao_price, 2):,} (τ{round(c.emission, 2):,})": c.incentive for c in leaderboard_df if c.incentive and c.competition == competition.id},
|
261 |
num_top_classes=10,
|
262 |
)
|
263 |
|
@@ -269,7 +269,7 @@ with demo:
|
|
269 |
if entry.competition == competition.id:
|
270 |
sample = scores[entry.uid]["sample"]
|
271 |
if sample is not None:
|
272 |
-
name = f"{entry.namespace}/{entry.name} ({entry.commit[0:8]})"
|
273 |
with gr.Tab(name):
|
274 |
gr.Chatbot([(sample[0], sample[1])])
|
275 |
# gr.Chatbot([(sample[0], f"*{name}*: {sample[1]}"), (None, f"*GPT-4*: {sample[2]}")])
|
@@ -296,7 +296,7 @@ with demo:
|
|
296 |
reverse=True
|
297 |
)
|
298 |
],
|
299 |
-
headers=["UID", "Stake (τ)", "V-Trust"] + [f"{c.namespace}/{c.name} ({c.commit[0:8]})" for c in leaderboard_df if c.incentive],
|
300 |
datatype=["number", "number", "number"] + ["number" for c in leaderboard_df if c.incentive],
|
301 |
interactive=False,
|
302 |
visible=True,
|
|
|
232 |
def leaderboard_data(show_stale: bool, scores: typing.Dict[int, typing.Dict[str, typing.Optional[float | str]]], competition_id: str):
|
233 |
value = [
|
234 |
[
|
235 |
+
f'[{c.namespace}/{c.name} ({c.commit[0:8]}, UID={c.uid})](https://huggingface.co/{c.namespace}/{c.name}/commit/{c.commit})',
|
236 |
format_score(c.uid, scores, "win_rate"),
|
237 |
format_score(c.uid, scores, "perplexity"),
|
238 |
format_score(c.uid, scores, "weight"),
|
|
|
257 |
scores = competition_scores[competition.id]
|
258 |
|
259 |
gr.Label(
|
260 |
+
value={ f"{c.namespace}/{c.name} ({c.commit[0:8]}, UID={c.uid}) · ${round(c.emission * tao_price, 2):,} (τ{round(c.emission, 2):,})": c.incentive for c in leaderboard_df if c.incentive and c.competition == competition.id},
|
261 |
num_top_classes=10,
|
262 |
)
|
263 |
|
|
|
269 |
if entry.competition == competition.id:
|
270 |
sample = scores[entry.uid]["sample"]
|
271 |
if sample is not None:
|
272 |
+
name = f"{entry.namespace}/{entry.name} ({entry.commit[0:8]}, UID={entry.uid})"
|
273 |
with gr.Tab(name):
|
274 |
gr.Chatbot([(sample[0], sample[1])])
|
275 |
# gr.Chatbot([(sample[0], f"*{name}*: {sample[1]}"), (None, f"*GPT-4*: {sample[2]}")])
|
|
|
296 |
reverse=True
|
297 |
)
|
298 |
],
|
299 |
+
headers=["UID", "Stake (τ)", "V-Trust"] + [f"{c.namespace}/{c.name} ({c.commit[0:8]}, UID={c.uid})" for c in leaderboard_df if c.incentive],
|
300 |
datatype=["number", "number", "number"] + ["number" for c in leaderboard_df if c.incentive],
|
301 |
interactive=False,
|
302 |
visible=True,
|