Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -710,15 +710,21 @@ def get_data2():
|
|
710 |
demo = gr.Blocks()
|
711 |
with demo:
|
712 |
try:
|
713 |
-
dataframe1 =
|
|
|
714 |
column_values_unique = sorted(dataframe1.iloc[:, 3].unique())
|
|
|
715 |
dataframe2 = pd.DataFrame({'Levels': column_values_unique})
|
|
|
716 |
counts = {}
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
|
|
|
|
|
|
722 |
print(dataframe2)
|
723 |
|
724 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|
|
|
710 |
demo = gr.Blocks()
|
711 |
with demo:
|
712 |
try:
|
713 |
+
dataframe1 = global_df.copy()
|
714 |
+
print(dataframe1)
|
715 |
column_values_unique = sorted(dataframe1.iloc[:, 3].unique())
|
716 |
+
print(column_values_unique)
|
717 |
dataframe2 = pd.DataFrame({'Levels': column_values_unique})
|
718 |
+
print(dataframe2)
|
719 |
counts = {}
|
720 |
+
try:
|
721 |
+
for value in data.iloc[:, 3]:
|
722 |
+
print(value)
|
723 |
+
print(type(value))
|
724 |
+
counts[value] = counts.get(value, 0) + 1
|
725 |
+
dataframe2['Members'] = dataframe2['Levels'].map(counts)
|
726 |
+
except Exception as e:
|
727 |
+
print(f"dataframe2 Error: {e}")
|
728 |
print(dataframe2)
|
729 |
|
730 |
TITLE = """<h1 align="center" id="space-title">🤗 Hugging Face Level Leaderboard</h1>"""
|