Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,8 +73,8 @@ def extract_leaderboard_stats(game_name: str) -> pd.DataFrame:
|
|
73 |
"FROM game_results"
|
74 |
df = pd.read_sql_query(query, conn)
|
75 |
|
76 |
-
#
|
77 |
-
game_query = "SELECT AVG(generation_time) FROM moves
|
78 |
avg_gen_time = conn.execute(game_query).fetchone()[0] or 0
|
79 |
else:
|
80 |
query = "SELECT COUNT(DISTINCT episode) AS games_played, " \
|
@@ -150,4 +150,3 @@ with gr.Blocks() as interface:
|
|
150 |
|
151 |
# Launch the Gradio interface
|
152 |
interface.launch()
|
153 |
-
|
|
|
73 |
"FROM game_results"
|
74 |
df = pd.read_sql_query(query, conn)
|
75 |
|
76 |
+
# Compute avg_generation_time across all games instead of a single game
|
77 |
+
game_query = "SELECT AVG(generation_time) FROM moves"
|
78 |
avg_gen_time = conn.execute(game_query).fetchone()[0] or 0
|
79 |
else:
|
80 |
query = "SELECT COUNT(DISTINCT episode) AS games_played, " \
|
|
|
150 |
|
151 |
# Launch the Gradio interface
|
152 |
interface.launch()
|
|