Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
reset
Browse files
app.py
CHANGED
@@ -27,22 +27,365 @@ DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
27 |
intents = discord.Intents.all()
|
28 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
@bot.event
|
32 |
async def on_ready():
|
|
|
33 |
print(f'Logged in as {bot.user.name}')
|
34 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
35 |
# testing sheet -> read -> paste sheet
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
""""""
|
38 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
39 |
def run_bot():
|
40 |
bot.run(DISCORD_TOKEN)
|
41 |
threading.Thread(target=run_bot).start()
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
demo = gr.Blocks()
|
45 |
with demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
TITLE = """<h1 align="center" id="space-title">π€ Hugging Face Level Leaderboard</h1>"""
|
47 |
gr.HTML(TITLE)
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
intents = discord.Intents.all()
|
28 |
bot = commands.Bot(command_prefix='!', intents=intents)
|
29 |
|
30 |
+
#logger = logging.getLogger(__name__)
|
31 |
+
#logging.basicConfig(level=logging.DEBUG)
|
32 |
+
|
33 |
+
|
34 |
+
""""""
|
35 |
+
XP_PER_MESSAGE = 10 # 100k messages = 1M exp = lvl 100
|
36 |
+
""""""
|
37 |
+
service_account = json.loads(os.environ.get('KEY'))
|
38 |
+
file_path = 'service_account.json'
|
39 |
+
with open(file_path, 'w') as json_file:
|
40 |
+
json.dump(service_account, json_file)
|
41 |
+
gspread_bot = gspread.service_account(filename='service_account.json')
|
42 |
+
#worksheet = gspread_bot.open("levelbot").sheet1
|
43 |
+
worksheet2 = gspread_bot.open("hf_discord_verified_users_test").sheet1
|
44 |
+
""""""
|
45 |
+
bot_ids = [1136614989411655780, 1166392942387265536, 1158038249835610123, 1130774761031610388, 1155489509518098565, 1155169841276260546, 1152238037355474964, 1154395078735953930]
|
46 |
+
""""""
|
47 |
+
api = HfApi()
|
48 |
+
""""""
|
49 |
+
csv_file = 'data.csv'
|
50 |
|
51 |
@bot.event
|
52 |
async def on_ready():
|
53 |
+
global csv_file
|
54 |
print(f'Logged in as {bot.user.name}')
|
55 |
print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
|
56 |
# testing sheet -> read -> paste sheet
|
57 |
|
58 |
+
"""import data from google sheets -> HF Space .csv (doesn't make API call this way, as it's read-only)"""
|
59 |
+
#data = pd.read_csv("https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/export?format=csv&gid=0")
|
60 |
+
#print(f"csv successfully retrieved: {data}")
|
61 |
+
#data.to_csv(csv_file, index=False)
|
62 |
+
|
63 |
+
|
64 |
+
def update_google_sheet():
|
65 |
+
"""save data from HF Space -> google sheets (makes 1 API call)"""
|
66 |
+
print("test")
|
67 |
+
data = open(csv_file, 'r').read()
|
68 |
+
print("test")
|
69 |
+
# 1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w = live
|
70 |
+
# 1YJEwP7kZChI3Z2GKv4zFEfwwyQrO3zwXclv0QMrkOqA = test
|
71 |
+
spreadsheet_id = "1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w"
|
72 |
+
print("test")
|
73 |
+
gspread_bot.import_csv(spreadsheet_id, data)
|
74 |
+
print({f"Google sheet {spreadsheet_id} successfully updated!"})
|
75 |
+
|
76 |
+
"""
|
77 |
+
scheduler = BackgroundScheduler()
|
78 |
+
scheduler.add_job(update_google_sheet, "interval", seconds=60)
|
79 |
+
scheduler.start()
|
80 |
+
|
81 |
+
"""
|
82 |
+
|
83 |
+
|
84 |
+
def calculate_level(xp):
|
85 |
+
return int(xp ** (1.0 / 3.0))
|
86 |
+
|
87 |
+
|
88 |
+
def calculate_xp(level):
|
89 |
+
return (int(level ** 3))
|
90 |
+
|
91 |
+
|
92 |
+
processed_users = set()
|
93 |
+
|
94 |
+
async def periodic_api_test(): # needs rewrite, can do same thing and interact with csv -> push to google sheets
|
95 |
+
try:
|
96 |
+
await asyncio.sleep(1)
|
97 |
+
column_values_3 = worksheet2.col_values(3)
|
98 |
+
column_values_8 = worksheet2.col_values(8)
|
99 |
+
|
100 |
+
for i, user in enumerate(column_values_3):
|
101 |
+
if user in processed_users:
|
102 |
+
continue
|
103 |
+
|
104 |
+
url = f"https://huggingface.co/api/users/{user}/overview"
|
105 |
+
response = requests.get(url)
|
106 |
+
|
107 |
+
if response.status_code == 200:
|
108 |
+
data = response.json()
|
109 |
+
|
110 |
+
likes = data["numLikes"]
|
111 |
+
models = data["numModels"]
|
112 |
+
datasets = data["numDatasets"]
|
113 |
+
spaces = data["numSpaces"]
|
114 |
+
discussions = data["numDiscussions"]
|
115 |
+
papers = data["numPapers"]
|
116 |
+
upvotes = data["numUpvotes"]
|
117 |
+
|
118 |
+
worksheet2.update(values=[[likes, models, datasets, spaces, discussions, papers, upvotes]],
|
119 |
+
range_name=f'G{i+1}:M{i+1}')
|
120 |
+
|
121 |
+
processed_users.add(user)
|
122 |
+
else:
|
123 |
+
print(f"Failed to retrieve data for user {user}. Status code: {response.status_code}")
|
124 |
+
|
125 |
+
except Exception as e:
|
126 |
+
print(f"periodic_api_test Error: {e}")
|
127 |
+
|
128 |
+
|
129 |
+
async def add_exp(member_id):
|
130 |
+
try:
|
131 |
+
global csv_file
|
132 |
+
|
133 |
+
guild = bot.get_guild(879548962464493619)
|
134 |
+
member = guild.get_member(member_id)
|
135 |
+
lvl1 = guild.get_role(1171861537699397733)
|
136 |
+
lvl2 = guild.get_role(1171861595115245699)
|
137 |
+
lvl3 = guild.get_role(1171861626715115591)
|
138 |
+
lvl4 = guild.get_role(1171861657975259206)
|
139 |
+
lvl5 = guild.get_role(1171861686580412497)
|
140 |
+
lvl6 = guild.get_role(1171861900301172736)
|
141 |
+
lvl7 = guild.get_role(1171861936258941018)
|
142 |
+
lvl8 = guild.get_role(1171861968597024868)
|
143 |
+
lvl9 = guild.get_role(1171862009982242836)
|
144 |
+
lvl10 = guild.get_role(1164188093713223721)
|
145 |
+
lvl11 = guild.get_role(1171524944354607104)
|
146 |
+
lvl12 = guild.get_role(1171524990257082458)
|
147 |
+
lvl13 = guild.get_role(1171525021928263791)
|
148 |
+
lvl14 = guild.get_role(1171525062201966724)
|
149 |
+
lvl15 = guild.get_role(1171525098465918996)
|
150 |
+
lvl16 = guild.get_role(1176826165546201099)
|
151 |
+
lvl17 = guild.get_role(1176826221301092392)
|
152 |
+
lvl18 = guild.get_role(1176826260643659776)
|
153 |
+
lvl19 = guild.get_role(1176826288816791693)
|
154 |
+
lvl20 = guild.get_role(1176826319447801896)
|
155 |
+
|
156 |
+
lvl21 = guild.get_role(1195030831174008902)
|
157 |
+
lvl22 = guild.get_role(1195030883351150592)
|
158 |
+
lvl23 = guild.get_role(1196055555006009445)
|
159 |
+
lvl24 = guild.get_role(1196055640917938216)
|
160 |
+
lvl25 = guild.get_role(1196055712506318869)
|
161 |
+
lvl26 = guild.get_role(1196055775924195378)
|
162 |
+
lvl27 = guild.get_role(1196055837018435664)
|
163 |
+
lvl28 = guild.get_role(1196055908267081849)
|
164 |
+
lvl29 = guild.get_role(1196055970804150352)
|
165 |
+
lvl30 = guild.get_role(1196056027720847380)
|
166 |
+
|
167 |
+
lvls = {
|
168 |
+
1: lvl1, 2: lvl2, 3: lvl3, 4: lvl4, 5: lvl5, 6: lvl6, 7: lvl7, 8: lvl8, 9: lvl9, 10: lvl10,
|
169 |
+
11: lvl11, 12: lvl12, 13: lvl13, 14: lvl14, 15: lvl15, 16: lvl16, 17: lvl17, 18: lvl18, 19: lvl19, 20: lvl20,
|
170 |
+
21: lvl21, 22: lvl22, 23: lvl23, 24: lvl24, 25: lvl25, 26: lvl26, 27: lvl27, 28: lvl28, 29: lvl29, 30: lvl30,
|
171 |
+
}
|
172 |
+
|
173 |
+
data = pd.read_csv(csv_file)
|
174 |
+
member_found = False
|
175 |
+
for index, cell_value in data.iloc[:, 0].items():
|
176 |
+
if cell_value == member_id:
|
177 |
+
# if found, update that row...
|
178 |
+
member_found = True
|
179 |
+
print(f"Record for {member} found at row {index + 1}, column 1")
|
180 |
+
|
181 |
+
# increment the old experience value (better not to replace outright)
|
182 |
+
old_xp = data.loc[index, 'discord_exp']
|
183 |
+
print(old_xp)
|
184 |
+
new_xp = old_xp + XP_PER_MESSAGE
|
185 |
+
print(f"new_xp = old_xp + XP_PER_MESSAGE / {new_xp} = {old_xp} + {XP_PER_MESSAGE}")
|
186 |
+
data.loc[index, 'discord_exp'] = new_xp # do not change column name
|
187 |
+
test = data.loc[index, 'discord_exp']
|
188 |
+
print(test)
|
189 |
+
print(f"Record for {member} updated from {old_xp} to {new_xp} (+{XP_PER_MESSAGE}) ")
|
190 |
+
|
191 |
+
# level up
|
192 |
+
current_level = calculate_level(new_xp)
|
193 |
+
print(f"Current_level for {member}: {current_level}")
|
194 |
+
if current_level >= 2 and current_level <=30:
|
195 |
+
current_role = lvls[current_level]
|
196 |
+
if current_role not in member.roles:
|
197 |
+
await member.add_roles(current_role)
|
198 |
+
print(f"Level Up! Gave {member} {current_role}")
|
199 |
+
await member.remove_roles(lvls[current_level-1])
|
200 |
+
print(f"Removed {lvls[current_level-1]} from {member}")
|
201 |
+
#print(f"{member} Level up! {current_level-1} -> {current_level}!")
|
202 |
+
if current_role in member.roles:
|
203 |
+
await member.send(f"Level up! {current_level-1} -> {current_level}!")
|
204 |
+
|
205 |
+
if not member_found:
|
206 |
+
# if not, create new record
|
207 |
+
print(f"creating new record for {member}")
|
208 |
+
#string_member_id = str(member.id)
|
209 |
+
xp = 10 # define somewhere else?
|
210 |
+
current_level = calculate_level(xp)
|
211 |
+
member_name = member.name
|
212 |
+
row_data = [member_id, member_name, xp, current_level]
|
213 |
+
new_row_df = pd.DataFrame([row_data], columns=data.columns)
|
214 |
+
updated_df = data.append(new_row_df, ignore_index=True)
|
215 |
+
updated_df.to_csv(csv_file, index=False)
|
216 |
+
# initial role assignment
|
217 |
+
if current_level == 1:
|
218 |
+
if lvl1 not in member.roles:
|
219 |
+
await member.add_roles(lvl1)
|
220 |
+
print(f"Gave {member} {lvl1}") # can log this better
|
221 |
+
|
222 |
+
if member_id == 811235357663297546:
|
223 |
+
update_google_sheet()
|
224 |
+
except Exception as e:
|
225 |
+
print(f"add_exp Error: {e}")
|
226 |
+
|
227 |
+
|
228 |
+
@bot.event
|
229 |
+
async def on_message(message):
|
230 |
+
try:
|
231 |
+
if message.author.id not in bot_ids: # could change to if author does not have bot role (roleid)
|
232 |
+
if "!help_xp" not in message.content:
|
233 |
+
print(f"adding exp from message {message.author}")
|
234 |
+
if message.author.id == 811235357663297546:
|
235 |
+
if message.content == '!stop':
|
236 |
+
print('Stopping bot...')
|
237 |
+
await bot.close()
|
238 |
+
sys.exit()
|
239 |
+
await asyncio.sleep(1)
|
240 |
+
await add_exp(message.author.id)
|
241 |
+
#await periodic_api_test() # run this ~1 per day otherwise will lead to issues
|
242 |
+
await bot.process_commands(message)
|
243 |
+
except Exception as e:
|
244 |
+
print(f"on_message Error: {e}")
|
245 |
+
|
246 |
+
|
247 |
+
@bot.event
|
248 |
+
async def on_reaction_add(reaction, user):
|
249 |
+
try:
|
250 |
+
if user.id not in bot_ids:
|
251 |
+
print(f"adding exp from react {user.id}")
|
252 |
+
await asyncio.sleep(1)
|
253 |
+
await add_exp(user.id)
|
254 |
+
except Exception as e:
|
255 |
+
print(f"on_reaction_add Error: {e}")
|
256 |
+
|
257 |
+
|
258 |
+
@bot.command(name='update_leaderboard')
|
259 |
+
async def update_leaderboard(ctx, num_results: int = 10): # needs rewrite
|
260 |
+
if ctx.author.id == 811235357663297546:
|
261 |
+
await asyncio.sleep(1)
|
262 |
+
worksheet = gspread_bot.open("levelbot").sheet1
|
263 |
+
|
264 |
+
names_list = worksheet.col_values(2)[1:]
|
265 |
+
levels_list = worksheet.col_values(4)[1:]
|
266 |
+
exp_list = worksheet.col_values(3)[1:]
|
267 |
+
channel = bot.get_channel(1197143964994773023)
|
268 |
+
message = await channel.fetch_message(1197148293164187678)
|
269 |
+
|
270 |
+
# for 3 lists
|
271 |
+
combined_list = [list(sublist) for sublist in zip(names_list, levels_list, exp_list)]
|
272 |
+
combined_list = [[name, int(level), int(exp)] for name, level, exp in combined_list]
|
273 |
+
combined_list = sorted(combined_list, key=lambda x: x[1], reverse=True)
|
274 |
+
|
275 |
+
print(combined_list)
|
276 |
+
top_results = combined_list[:num_results]
|
277 |
+
#print(top_results)
|
278 |
+
|
279 |
+
"""
|
280 |
+
# get position, then find that value in updated_names_list
|
281 |
+
levels_list = list(map(int, levels_list))
|
282 |
+
data_pairs = list(zip(names_list, levels_list))
|
283 |
+
sorted_data_pairs = sorted(data_pairs, key=lambda x: x[1], reverse=True)
|
284 |
+
top_data_pairs = sorted_data_pairs[:num_results]
|
285 |
+
"""
|
286 |
+
|
287 |
+
# remove huggingfolks
|
288 |
+
guild = ctx.guild
|
289 |
+
role = discord.utils.get(guild.roles, id=897376942817419265)
|
290 |
+
if role is None:
|
291 |
+
await ctx.send("Role not found.")
|
292 |
+
return
|
293 |
+
members_with_role = [member.name for member in guild.members if role in member.roles]
|
294 |
+
top_results = [r for r in top_results if r[0] not in members_with_role]
|
295 |
+
|
296 |
+
for name, level, xp in top_results:
|
297 |
+
print(f"Name: {name}, Level: {level}, Exp: {xp}")
|
298 |
+
|
299 |
+
|
300 |
+
def xp_required_to_next_level(current_level, current_xp):
|
301 |
+
level_floor_xp = calculate_xp(current_level)
|
302 |
+
level_ceiling_xp = calculate_xp(current_level+1)
|
303 |
+
xp_to_level_up = level_ceiling_xp - current_xp
|
304 |
+
return (xp_to_level_up)
|
305 |
+
|
306 |
+
|
307 |
+
# put into message / leaderboard
|
308 |
+
new_leaderboard_data = [(name, level, str(xp_required_to_next_level(int(level), int(xp)))) for name, level, xp in top_results]
|
309 |
+
new_table = tabulate(new_leaderboard_data, headers=["Name", "Level", "XP to level up"], tablefmt="plain")
|
310 |
+
await message.edit(content=f"Updated Leaderboard:\n```\n{new_table}\n```")
|
311 |
+
|
312 |
+
|
313 |
+
@bot.command(name='xp_help')
|
314 |
+
async def xp_help(ctx):
|
315 |
+
help_message = "How to earn Discord / Hub exp: Post messages, react, Like, discuss, create repos and papers"
|
316 |
+
await ctx.author.send(help_message)
|
317 |
+
|
318 |
+
# embeds with user pfps?
|
319 |
+
# name, pfp, time in server....
|
320 |
+
|
321 |
+
# discord_level column
|
322 |
+
# pick 10 highest
|
323 |
+
# update
|
324 |
+
|
325 |
+
# weekly do different count
|
326 |
+
# count number of messages per user for every channel (total messages)
|
327 |
+
# fix sheet if necessary
|
328 |
+
|
329 |
+
# might need cell location data to pull both level and username at same time
|
330 |
+
# add emojis for some color
|
331 |
+
# check if members are still in the server
|
332 |
+
|
333 |
""""""
|
334 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
335 |
def run_bot():
|
336 |
bot.run(DISCORD_TOKEN)
|
337 |
threading.Thread(target=run_bot).start()
|
338 |
|
339 |
+
URL = "https://docs.google.com/spreadsheets/d/1hQSsIg1Y9WdBF_CdNM1L1rUUREoxKqRTe3_ILo-WK8w/edit#gid=0"
|
340 |
+
csv_url = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
341 |
+
|
342 |
+
def get_data():
|
343 |
+
data = pd.read_csv(csv_url)
|
344 |
+
first_3_columns = data.iloc[:, 1:4]
|
345 |
+
first_3_columns.to_csv('first_3_columns.csv', index=False)
|
346 |
+
return first_3_columns
|
347 |
+
|
348 |
+
# csv
|
349 |
+
# read into pandas dataframe1
|
350 |
+
# read levels column and create pandas dataframe2 with first column containing levels from 2-max found in dataframe1
|
351 |
+
# create second column in dataframe2 for number of each level found in dataframe1 levels column
|
352 |
|
353 |
demo = gr.Blocks()
|
354 |
with demo:
|
355 |
+
dataframe1 = pd.read_csv(csv_url)
|
356 |
+
column_values_unique = sorted(dataframe1.iloc[:, 3].unique())
|
357 |
+
dataframe2 = pd.DataFrame({'Levels': column_values_unique})
|
358 |
+
counts = {}
|
359 |
+
for value in dataframe1.iloc[:, 3]:
|
360 |
+
counts[value] = counts.get(value, 0) + 1
|
361 |
+
dataframe2['Members'] = dataframe2['Levels'].map(counts)
|
362 |
+
|
363 |
+
print("Dataframe 1:")
|
364 |
+
print(dataframe1)
|
365 |
+
print("\nDataframe 2:")
|
366 |
+
print(dataframe2)
|
367 |
+
|
368 |
TITLE = """<h1 align="center" id="space-title">π€ Hugging Face Level Leaderboard</h1>"""
|
369 |
gr.HTML(TITLE)
|
370 |
+
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
371 |
+
with gr.TabItem("π
Level leaderboard", elem_id="level-table", id=0):
|
372 |
+
#gr.Markdown("# π Experience Leaderboard")
|
373 |
+
with gr.Row():
|
374 |
+
with gr.Column():
|
375 |
+
gr.DataFrame(get_data, every=5, height=500, interactive=False, col_count=(3, "fixed"), column_widths=["100px","100px","100px"])
|
376 |
+
|
377 |
+
with gr.Column():
|
378 |
+
gr.BarPlot(
|
379 |
+
value=dataframe2,
|
380 |
+
x="Levels",
|
381 |
+
y="Members",
|
382 |
+
title="Level Distribution",
|
383 |
+
height=450,
|
384 |
+
width=450,
|
385 |
+
interactive=False
|
386 |
+
)
|
387 |
+
#with gr.TabItem("π Members of the Week", elem_id="week-table", id=1):
|
388 |
+
|
389 |
+
#with gr.TabItem("π Hub-only leaderboard", elem_id="hub-table", id=2):
|
390 |
+
|
391 |
+
demo.queue().launch()
|