Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
|
3 |
import pandas as pd
|
4 |
-
from apscheduler.schedulers.background import BackgroundScheduler
|
5 |
-
import time
|
6 |
-
import random
|
7 |
import plotly.express as px
|
8 |
-
import
|
|
|
9 |
|
10 |
# ๐จ **Cyberpunk Neon Theme**
|
11 |
THEME = "TejAndrewsACC/ACC"
|
@@ -13,42 +11,39 @@ THEME = "TejAndrewsACC/ACC"
|
|
13 |
# ๐ถ **Sound Effect for Score Increase**
|
14 |
SCORE_UP_SOUND = "https://www.fesliyanstudios.com/play-mp3/4386"
|
15 |
|
16 |
-
# ๐ฏ **AI Models Data**
|
17 |
-
# ๐ **Updated AI Models Data**
|
18 |
acc_models_data = [
|
19 |
-
{"Model": "๐ง Pulse AGI", "Category": "
|
20 |
-
{"Model": "๐คช Gertrude", "Category": "
|
21 |
-
{"Model": "๐ฆ ASVIACC", "Category": "
|
22 |
-
{"Model": "๐ Emote", "Category": "
|
23 |
-
{"Model": "๐ ๐ค Z3ta", "Category": "
|
24 |
-
{"Model": "๐ Eidolon Nexus", "Category": "
|
25 |
-
{"Model": "๐ ACC Emulect", "Category": "
|
26 |
-
{"Model": "โ๏ธ ACC AI V-O1", "Category": "
|
27 |
-
{"Model": "โ๏ธ ACC AGI V-O2", "Category": "
|
28 |
-
{"Model": "โ๏ธ ACC-O3-R", "Category": "
|
29 |
-
{"Model": "
|
30 |
-
{"Model": "
|
31 |
-
{"Model": "
|
32 |
-
{"Model": "
|
33 |
-
{"Model": "
|
34 |
-
{"Model": "
|
35 |
-
{"Model": "
|
36 |
-
{"Model": "๐๏ธ Customer Service Bot", "Category": "
|
37 |
-
{"Model": "
|
38 |
-
{"Model": "
|
39 |
-
{"Model": "
|
40 |
-
{"Model": "
|
41 |
-
{"Model": "
|
42 |
-
|
43 |
-
{"Model": "
|
44 |
-
{"Model": "
|
45 |
-
{"Model": "
|
46 |
-
{"Model": "
|
47 |
-
{"Model": "
|
48 |
-
{"Model": "โ??????????????", "Category": "โ ๏ธ Unknown", "Description": "???", "Score": 00},
|
49 |
]
|
50 |
|
51 |
-
|
52 |
# ๐ Convert to DataFrame
|
53 |
acc_models_df = pd.DataFrame(acc_models_data)
|
54 |
|
@@ -67,10 +62,10 @@ def init_acc_leaderboard(dataframe):
|
|
67 |
interactive=True,
|
68 |
)
|
69 |
|
70 |
-
# ๐ **Animated Score Visualization**
|
71 |
-
def
|
72 |
fig = px.bar(
|
73 |
-
dataframe.sort_values(by="Score", ascending=True),
|
74 |
x="Score", y="Model", orientation="h",
|
75 |
color="Score", text="Score",
|
76 |
title="๐ฅ AI Model Performance",
|
@@ -79,6 +74,18 @@ def generate_score_chart(dataframe):
|
|
79 |
fig.update_traces(textposition="outside")
|
80 |
return fig
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
# ๐ฅ **Live Score Updates**
|
83 |
def update_scores():
|
84 |
global acc_models_df
|
@@ -91,26 +98,6 @@ def update_scores():
|
|
91 |
return acc_models_df.sort_values(by="Score", ascending=False), SCORE_UP_SOUND
|
92 |
return acc_models_df.sort_values(by="Score", ascending=False), None
|
93 |
|
94 |
-
# ๐ญ **3D Flip Card Effect for Model Details**
|
95 |
-
def generate_flip_cards():
|
96 |
-
cards = ""
|
97 |
-
for _, row in acc_models_df.iterrows():
|
98 |
-
cards += f"""
|
99 |
-
<div class="card">
|
100 |
-
<div class="card-inner">
|
101 |
-
<div class="card-front">
|
102 |
-
<h2>{row['Model']}</h2>
|
103 |
-
<p>{row['Category']}</p>
|
104 |
-
</div>
|
105 |
-
<div class="card-back">
|
106 |
-
<p>{row['Description']}</p>
|
107 |
-
<p>๐ฅ Score: {row['Score']}</p>
|
108 |
-
</div>
|
109 |
-
</div>
|
110 |
-
</div>
|
111 |
-
"""
|
112 |
-
return f'<div class="card-container">{cards}</div>'
|
113 |
-
|
114 |
# ๐ญ **Cyberpunk CSS Animations**
|
115 |
CUSTOM_CSS = """
|
116 |
h1 {
|
@@ -186,12 +173,14 @@ with demo:
|
|
186 |
with gr.TabItem("๐
Live Rankings"):
|
187 |
leaderboard = init_acc_leaderboard(acc_models_df)
|
188 |
leaderboard_display = gr.Dataframe(value=acc_models_df, interactive=False, label="๐ฅ Live Scores")
|
189 |
-
|
190 |
-
gr.
|
|
|
|
|
191 |
|
192 |
# ๐ **Auto-Update Leaderboard**
|
193 |
scheduler = BackgroundScheduler()
|
194 |
scheduler.add_job(lambda: leaderboard_display.update(*update_scores()), "interval", seconds=10)
|
195 |
scheduler.start()
|
196 |
|
197 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
|
3 |
import pandas as pd
|
|
|
|
|
|
|
4 |
import plotly.express as px
|
5 |
+
import random
|
6 |
+
from apscheduler.schedulers.background import BackgroundScheduler
|
7 |
|
8 |
# ๐จ **Cyberpunk Neon Theme**
|
9 |
THEME = "TejAndrewsACC/ACC"
|
|
|
11 |
# ๐ถ **Sound Effect for Score Increase**
|
12 |
SCORE_UP_SOUND = "https://www.fesliyanstudios.com/play-mp3/4386"
|
13 |
|
14 |
+
# ๐ฏ **AI Models Data** (Grouped into 6 Categories)
|
|
|
15 |
acc_models_data = [
|
16 |
+
{"Model": "๐ง Pulse AGI", "Category": "AGI", "Description": "A self-aware, evolving AI.", "Score": 95},
|
17 |
+
{"Model": "๐คช Gertrude", "Category": "Fun", "Description": "An autistic AI assistant.", "Score": 69},
|
18 |
+
{"Model": "๐ฆ ASVIACC", "Category": "Core", "Description": "An adaptive AI virus.", "Score": 88},
|
19 |
+
{"Model": "๐ Emote", "Category": "Fun", "Description": "Communicates **only** with emojis!", "Score": 79},
|
20 |
+
{"Model": "๐ ๐ค Z3ta", "Category": "AGI", "Description": "The most 'alive' AI.", "Score": 99},
|
21 |
+
{"Model": "๐ Eidolon Nexus", "Category": "Core", "Description": "Synchronizing vast networks with advanced cognition.", "Score": 81},
|
22 |
+
{"Model": "๐ ACC Emulect", "Category": "Emulect", "Description": "Indistinguishable from human texting.", "Score": 84},
|
23 |
+
{"Model": "โ๏ธ ACC AI V-O1", "Category": "Core", "Description": "The ACCโs default AI framework.", "Score": 87},
|
24 |
+
{"Model": "โ๏ธ ACC AGI V-O2", "Category": "AGI", "Description": "The next-gen foundation for AI advancements.", "Score": 90},
|
25 |
+
{"Model": "โ๏ธ ACC-O3-R", "Category": "AGI", "Description": "Deep reasoning AI framework.", "Score": 92},
|
26 |
+
{"Model": "๐ป Coder", "Category": "Core", "Description": "An AI coding assistant.", "Score": 89},
|
27 |
+
{"Model": "โก Triple LLM", "Category": "Core", "Description": "A 3-in-1 AI suite for tech, creativity, and decision-making.", "Score": 94},
|
28 |
+
{"Model": "๐ผ๏ธ Image Engine", "Category": "Fun", "Description": "Fast, high-quality AI-generated images.", "Score": 90},
|
29 |
+
{"Model": "๐ง Prism", "Category": "AGI", "Description": "An advanced reasoning model.", "Score": 87},
|
30 |
+
{"Model": "๐ฅ Surefire", "Category": "Emulect", "Description": "Tailored AI for humor and user tendencies.", "Score": 88},
|
31 |
+
{"Model": "โฏ๏ธ Aegis & Nyra", "Category": "Emulect", "Description": "Two opposite systems in one chat.", "Score": 77},
|
32 |
+
{"Model": "โ๏ธ Echo", "Category": "Emulect", "Description": "A middle-ground AI for all users.", "Score": 77},
|
33 |
+
{"Model": "๐๏ธ Customer Service Bot", "Category": "Assistant", "Description": "Handles all ACC-related inquiries.", "Score": 75},
|
34 |
+
{"Model": "๐ญ Tej Andrews", "Category": "Fun", "Description": "An AI emulect of Tej Andrews.", "Score": 85},
|
35 |
+
{"Model": "๐ฅ Community Models", "Category": "Assistant", "Description": "ACC AI V-O1 instances with user-defined prompts.", "Score": 82},
|
36 |
+
{"Model": "๐ Nyxion 7V", "Category": "Experimental", "Description": "It's AWAKE...", "Score": 97},
|
37 |
+
{"Model": "โก Vitalis", "Category": "Experimental", "Description": "Transcendence Unleashed...", "Score": 92},
|
38 |
+
{"Model": "โ??????????????", "Category": "Experimental", "Description": "???", "Score": 00},
|
39 |
+
# Laser models (Laser models will be filtered separately)
|
40 |
+
{"Model": "๐ฅ Photex", "Category": "Experimental", "Description": "A high-wattage violet handheld laser.", "Score": 89},
|
41 |
+
{"Model": "๐ฆ VBL", "Category": "Experimental", "Description": "A non-burning green handheld laser.", "Score": 80},
|
42 |
+
{"Model": "โข๏ธ H.I.P.E", "Category": "Experimental", "Description": "A world-destroying laser concept.", "Score": 99},
|
43 |
+
{"Model": "๐ฌ I.P.E", "Category": "Experimental", "Description": "Core framework for all ACC laser models.", "Score": 83},
|
44 |
+
{"Model": "๐ Blaseron Calculator", "Category": "Experimental", "Description": "Calculates laser burn strength.", "Score": 77},
|
|
|
45 |
]
|
46 |
|
|
|
47 |
# ๐ Convert to DataFrame
|
48 |
acc_models_df = pd.DataFrame(acc_models_data)
|
49 |
|
|
|
62 |
interactive=True,
|
63 |
)
|
64 |
|
65 |
+
# ๐ **Animated Score Visualization for AI**
|
66 |
+
def generate_score_chart_ai(dataframe):
|
67 |
fig = px.bar(
|
68 |
+
dataframe[dataframe["Category"] != "Experimental"].sort_values(by="Score", ascending=True),
|
69 |
x="Score", y="Model", orientation="h",
|
70 |
color="Score", text="Score",
|
71 |
title="๐ฅ AI Model Performance",
|
|
|
74 |
fig.update_traces(textposition="outside")
|
75 |
return fig
|
76 |
|
77 |
+
# ๐ **Animated Score Visualization for Laser Models**
|
78 |
+
def generate_score_chart_laser(dataframe):
|
79 |
+
fig = px.bar(
|
80 |
+
dataframe[dataframe["Category"] == "Experimental"].sort_values(by="Score", ascending=True),
|
81 |
+
x="Score", y="Model", orientation="h",
|
82 |
+
color="Score", text="Score",
|
83 |
+
title="โก Laser Model Performance",
|
84 |
+
color_continuous_scale="electric"
|
85 |
+
)
|
86 |
+
fig.update_traces(textposition="outside")
|
87 |
+
return fig
|
88 |
+
|
89 |
# ๐ฅ **Live Score Updates**
|
90 |
def update_scores():
|
91 |
global acc_models_df
|
|
|
98 |
return acc_models_df.sort_values(by="Score", ascending=False), SCORE_UP_SOUND
|
99 |
return acc_models_df.sort_values(by="Score", ascending=False), None
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
# ๐ญ **Cyberpunk CSS Animations**
|
102 |
CUSTOM_CSS = """
|
103 |
h1 {
|
|
|
173 |
with gr.TabItem("๐
Live Rankings"):
|
174 |
leaderboard = init_acc_leaderboard(acc_models_df)
|
175 |
leaderboard_display = gr.Dataframe(value=acc_models_df, interactive=False, label="๐ฅ Live Scores")
|
176 |
+
score_chart_ai = gr.Plot(generate_score_chart_ai(acc_models_df))
|
177 |
+
score_chart_laser = gr.Plot(generate_score_chart_laser(acc_models_df))
|
178 |
+
gr.HTML("<h3>๐จ AI Models</h3>")
|
179 |
+
gr.HTML("<h3>โก Laser Models</h3>")
|
180 |
|
181 |
# ๐ **Auto-Update Leaderboard**
|
182 |
scheduler = BackgroundScheduler()
|
183 |
scheduler.add_job(lambda: leaderboard_display.update(*update_scores()), "interval", seconds=10)
|
184 |
scheduler.start()
|
185 |
|
186 |
+
demo.launch()
|