Spaces:
Running
Running
Better CSS
#16
by jersuxs - opened
app.py
CHANGED
|
@@ -20,58 +20,357 @@ from app_sambanova import demo as demo_sambanova
|
|
| 20 |
from app_together import demo as demo_together
|
| 21 |
from app_xai import demo as demo_grok
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
with gr.Tab("Grok"):
|
| 27 |
-
demo_grok.render()
|
| 28 |
-
with gr.Tab("Hyperbolic"):
|
| 29 |
-
demo_hyperbolic.render()
|
| 30 |
-
gr.Markdown(
|
| 31 |
-
"""
|
| 32 |
-
<div>
|
| 33 |
-
<img src="https://storage.googleapis.com/public-arena-asset/hyperbolic_logo.png" alt="Hyperbolic Logo" style="height: 50px; margin-right: 10px;">
|
| 34 |
-
</div>
|
| 35 |
-
|
| 36 |
-
**Note:** This model is supported by Hyperbolic. Build your AI apps at [Hyperbolic](https://app.hyperbolic.xyz/).
|
| 37 |
-
"""
|
| 38 |
-
)
|
| 39 |
-
with gr.Tab("Gemini"):
|
| 40 |
-
demo_gemini.render()
|
| 41 |
-
with gr.Tab("ChatGPT"):
|
| 42 |
-
demo_openai.render()
|
| 43 |
-
with gr.Tab("Claude"):
|
| 44 |
-
demo_claude.render()
|
| 45 |
-
with gr.Tab("Qwen"):
|
| 46 |
-
demo_qwen.render()
|
| 47 |
-
with gr.Tab("Allen AI"):
|
| 48 |
-
demo_allenai.render()
|
| 49 |
-
with gr.Tab("Perplexity"):
|
| 50 |
-
demo_perplexity.render()
|
| 51 |
-
with gr.Tab("Experimental"):
|
| 52 |
-
demo_experimental.render()
|
| 53 |
-
with gr.Tab("Meta Llama"):
|
| 54 |
-
demo_sambanova.render()
|
| 55 |
-
gr.Markdown(
|
| 56 |
-
"**Note:** You need to use a SambaNova API key from [SambaNova Cloud](https://cloud.sambanova.ai/)."
|
| 57 |
-
)
|
| 58 |
-
with gr.Tab("Marco-o1"):
|
| 59 |
-
demo_marco_o1.render()
|
| 60 |
-
with gr.Tab("LTX Video"):
|
| 61 |
-
demo_ltx_video.render()
|
| 62 |
-
with gr.Tab("Groq"):
|
| 63 |
-
demo_groq.render()
|
| 64 |
-
with gr.Tab("Mistral"):
|
| 65 |
-
demo_mistral.render()
|
| 66 |
-
with gr.Tab("Fireworks"):
|
| 67 |
-
demo_fireworks.render()
|
| 68 |
-
with gr.Tab("Together"):
|
| 69 |
-
demo_together.render()
|
| 70 |
-
with gr.Tab("NVIDIA"):
|
| 71 |
-
demo_nvidia.render()
|
| 72 |
-
with gr.Tab("Flux"):
|
| 73 |
-
demo_flux.render()
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
if __name__ == "__main__":
|
| 77 |
demo.queue(api_open=False).launch(ssr_mode=False, show_api=False)
|
|
|
|
| 20 |
from app_together import demo as demo_together
|
| 21 |
from app_xai import demo as demo_grok
|
| 22 |
|
| 23 |
+
# Advanced theme configuration with enhanced animations
|
| 24 |
+
css = """
|
| 25 |
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
@keyframes gradient {
|
| 28 |
+
0% { background-position: 0% 50%; }
|
| 29 |
+
50% { background-position: 100% 50%; }
|
| 30 |
+
100% { background-position: 0% 50%; }
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
@keyframes float {
|
| 34 |
+
0% { transform: translateY(0px) rotate(0deg); }
|
| 35 |
+
50% { transform: translateY(-10px) rotate(1deg); }
|
| 36 |
+
100% { transform: translateY(0px) rotate(0deg); }
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
@keyframes glow {
|
| 40 |
+
0% { text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.8); }
|
| 41 |
+
50% { text-shadow: 0 0 20px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.8), 0 0 40px rgba(255,255,255,0.8); }
|
| 42 |
+
100% { text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.8); }
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
@keyframes fadeInBlur {
|
| 46 |
+
from {
|
| 47 |
+
opacity: 0;
|
| 48 |
+
transform: translateY(20px) scale(0.98);
|
| 49 |
+
filter: blur(10px);
|
| 50 |
+
}
|
| 51 |
+
to {
|
| 52 |
+
opacity: 1;
|
| 53 |
+
transform: translateY(0) scale(1);
|
| 54 |
+
filter: blur(0);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
@keyframes cyber-glow {
|
| 59 |
+
0% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 15px #0ff; }
|
| 60 |
+
50% { box-shadow: 0 0 10px #f0f, 0 0 20px #f0f, 0 0 30px #f0f; }
|
| 61 |
+
100% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 15px #0ff; }
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
:root {
|
| 65 |
+
--background-fill-primary: #0a0b1e;
|
| 66 |
+
--border-color-primary: #2a2b4a;
|
| 67 |
+
--neon-blue: #0ff;
|
| 68 |
+
--neon-purple: #f0f;
|
| 69 |
+
--space-black: #0a0b1e;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
* {
|
| 73 |
+
font-family: 'Space Grotesk', sans-serif;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
body {
|
| 77 |
+
background: radial-gradient(circle at center, #1a1b3e 0%, #0a0b1e 100%);
|
| 78 |
+
color: #fff;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
#custom-header {
|
| 82 |
+
background: linear-gradient(135deg, rgba(42, 43, 74, 0.7), rgba(10, 11, 30, 0.7));
|
| 83 |
+
backdrop-filter: blur(20px);
|
| 84 |
+
padding: 2.5rem;
|
| 85 |
+
border-radius: 20px;
|
| 86 |
+
margin: 1.5rem;
|
| 87 |
+
box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
|
| 88 |
+
border: 1px solid rgba(0, 255, 255, 0.1);
|
| 89 |
+
position: relative;
|
| 90 |
+
overflow: hidden;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
#custom-header::before {
|
| 94 |
+
content: '';
|
| 95 |
+
position: absolute;
|
| 96 |
+
top: -50%;
|
| 97 |
+
left: -50%;
|
| 98 |
+
width: 200%;
|
| 99 |
+
height: 200%;
|
| 100 |
+
background: radial-gradient(circle at center,
|
| 101 |
+
rgba(0, 255, 255, 0.1) 0%,
|
| 102 |
+
transparent 50%);
|
| 103 |
+
animation: gradient 15s linear infinite;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
#custom-header h1 {
|
| 107 |
+
color: white;
|
| 108 |
+
font-size: 3.5rem;
|
| 109 |
+
margin: 0;
|
| 110 |
+
text-align: center;
|
| 111 |
+
font-weight: 700;
|
| 112 |
+
letter-spacing: 2px;
|
| 113 |
+
animation: float 6s ease-in-out infinite, glow 3s ease-in-out infinite;
|
| 114 |
+
position: relative;
|
| 115 |
+
z-index: 1;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
#custom-header p {
|
| 119 |
+
color: var(--neon-blue);
|
| 120 |
+
text-align: center;
|
| 121 |
+
margin: 1rem 0 0 0;
|
| 122 |
+
font-size: 1.3rem;
|
| 123 |
+
opacity: 0.9;
|
| 124 |
+
letter-spacing: 1px;
|
| 125 |
+
text-transform: uppercase;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.tab-nav {
|
| 129 |
+
background: rgba(42, 43, 74, 0.7) !important;
|
| 130 |
+
backdrop-filter: blur(20px) !important;
|
| 131 |
+
border-radius: 15px !important;
|
| 132 |
+
padding: 1rem !important;
|
| 133 |
+
margin: 1rem !important;
|
| 134 |
+
border: 1px solid rgba(0, 255, 255, 0.1) !important;
|
| 135 |
+
animation: cyber-glow 4s infinite alternate !important;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.tab-nav button {
|
| 139 |
+
color: white !important;
|
| 140 |
+
border-radius: 10px !important;
|
| 141 |
+
margin: 0.4rem !important;
|
| 142 |
+
padding: 1rem 1.5rem !important;
|
| 143 |
+
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
| 144 |
+
background: rgba(10, 11, 30, 0.7) !important;
|
| 145 |
+
border: 1px solid rgba(0, 255, 255, 0.2) !important;
|
| 146 |
+
text-transform: uppercase !important;
|
| 147 |
+
letter-spacing: 1px !important;
|
| 148 |
+
font-weight: 500 !important;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.tab-nav button:hover {
|
| 152 |
+
transform: translateY(-3px) scale(1.02) !important;
|
| 153 |
+
background: rgba(0, 255, 255, 0.1) !important;
|
| 154 |
+
border-color: var(--neon-blue) !important;
|
| 155 |
+
box-shadow: 0 0 20px rgba(0, 255, 255, 0.3) !important;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.tab-nav button.selected {
|
| 159 |
+
background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2)) !important;
|
| 160 |
+
border: 1px solid var(--neon-blue) !important;
|
| 161 |
+
box-shadow: 0 0 20px rgba(0, 255, 255, 0.4) !important;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.message {
|
| 165 |
+
border-radius: 15px !important;
|
| 166 |
+
padding: 1.5rem !important;
|
| 167 |
+
margin: 1rem 0 !important;
|
| 168 |
+
background: rgba(42, 43, 74, 0.3) !important;
|
| 169 |
+
backdrop-filter: blur(10px) !important;
|
| 170 |
+
border: 1px solid rgba(0, 255, 255, 0.1) !important;
|
| 171 |
+
animation: fadeInBlur 0.5s ease-out !important;
|
| 172 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.message:hover {
|
| 176 |
+
transform: translateY(-3px) scale(1.01) !important;
|
| 177 |
+
box-shadow: 0 0 30px rgba(0, 255, 255, 0.2) !important;
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
.user-message {
|
| 181 |
+
background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(42, 43, 74, 0.3)) !important;
|
| 182 |
+
border-left: 4px solid var(--neon-blue) !important;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
.bot-message {
|
| 186 |
+
background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(42, 43, 74, 0.3)) !important;
|
| 187 |
+
border-left: 4px solid var(--neon-purple) !important;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
textarea, input[type="text"] {
|
| 191 |
+
background: rgba(10, 11, 30, 0.7) !important;
|
| 192 |
+
border: 1px solid rgba(0, 255, 255, 0.2) !important;
|
| 193 |
+
border-radius: 12px !important;
|
| 194 |
+
color: white !important;
|
| 195 |
+
backdrop-filter: blur(10px) !important;
|
| 196 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
| 197 |
+
font-family: 'Space Grotesk', sans-serif !important;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
textarea:focus, input[type="text"]:focus {
|
| 201 |
+
border-color: var(--neon-blue) !important;
|
| 202 |
+
box-shadow: 0 0 20px rgba(0, 255, 255, 0.2) !important;
|
| 203 |
+
transform: translateY(-2px) !important;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
::-webkit-scrollbar {
|
| 207 |
+
width: 12px;
|
| 208 |
+
height: 12px;
|
| 209 |
+
background: var(--space-black);
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
::-webkit-scrollbar-thumb {
|
| 213 |
+
background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
|
| 214 |
+
border-radius: 6px;
|
| 215 |
+
border: 3px solid var(--space-black);
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
::-webkit-scrollbar-thumb:hover {
|
| 219 |
+
background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
.loading-container {
|
| 223 |
+
position: relative;
|
| 224 |
+
width: 50px;
|
| 225 |
+
height: 50px;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
@keyframes neural-pulse {
|
| 229 |
+
0% { transform: scale(1); opacity: 0.5; }
|
| 230 |
+
50% { transform: scale(1.5); opacity: 0; }
|
| 231 |
+
100% { transform: scale(1); opacity: 0.5; }
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.neural-node {
|
| 235 |
+
position: absolute;
|
| 236 |
+
width: 4px;
|
| 237 |
+
height: 4px;
|
| 238 |
+
background: var(--neon-blue);
|
| 239 |
+
border-radius: 50%;
|
| 240 |
+
animation: neural-pulse 2s infinite;
|
| 241 |
+
}
|
| 242 |
+
"""
|
| 243 |
+
|
| 244 |
+
with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
| 245 |
+
with gr.Column():
|
| 246 |
+
gr.HTML("""
|
| 247 |
+
<div id="custom-header">
|
| 248 |
+
<h1>🤖 NeuraTalk AI</h1>
|
| 249 |
+
<p>Advanced Neural Interface for Multi-Model AI Communication</p>
|
| 250 |
+
<style>
|
| 251 |
+
@keyframes neural-spark {
|
| 252 |
+
0% { transform: scale(0) rotate(0deg); opacity: 0; }
|
| 253 |
+
50% { transform: scale(1) rotate(180deg); opacity: 1; }
|
| 254 |
+
100% { transform: scale(0) rotate(360deg); opacity: 0; }
|
| 255 |
+
}
|
| 256 |
+
.neural-spark {
|
| 257 |
+
position: absolute;
|
| 258 |
+
width: 2px;
|
| 259 |
+
height: 2px;
|
| 260 |
+
background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
|
| 261 |
+
border-radius: 50%;
|
| 262 |
+
animation: neural-spark 3s infinite;
|
| 263 |
+
}
|
| 264 |
+
</style>
|
| 265 |
+
<script>
|
| 266 |
+
function createNeuralNetwork() {
|
| 267 |
+
const header = document.getElementById('custom-header');
|
| 268 |
+
const particleCount = 30;
|
| 269 |
+
const connectionCount = 20;
|
| 270 |
+
|
| 271 |
+
// Create particles
|
| 272 |
+
for (let i = 0; i < particleCount; i++) {
|
| 273 |
+
const spark = document.createElement('div');
|
| 274 |
+
spark.className = 'neural-spark';
|
| 275 |
+
spark.style.left = Math.random() * 100 + '%';
|
| 276 |
+
spark.style.top = Math.random() * 100 + '%';
|
| 277 |
+
spark.style.animationDelay = Math.random() * 3 + 's';
|
| 278 |
+
header.appendChild(spark);
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
// Create neural connections
|
| 282 |
+
const canvas = document.createElement('canvas');
|
| 283 |
+
canvas.style.position = 'absolute';
|
| 284 |
+
canvas.style.top = '0';
|
| 285 |
+
canvas.style.left = '0';
|
| 286 |
+
canvas.style.width = '100%';
|
| 287 |
+
canvas.style.height = '100%';
|
| 288 |
+
canvas.style.pointerEvents = 'none';
|
| 289 |
+
header.appendChild(canvas);
|
| 290 |
+
|
| 291 |
+
const ctx = canvas.getContext('2d');
|
| 292 |
+
|
| 293 |
+
function animate() {
|
| 294 |
+
canvas.width = header.offsetWidth;
|
| 295 |
+
canvas.height = header.offsetHeight;
|
| 296 |
+
|
| 297 |
+
ctx.strokeStyle = 'rgba(0, 255, 255, 0.1)';
|
| 298 |
+
ctx.lineWidth = 1;
|
| 299 |
+
|
| 300 |
+
for (let i = 0; i < connectionCount; i++) {
|
| 301 |
+
const x1 = Math.random() * canvas.width;
|
| 302 |
+
const y1 = Math.random() * canvas.height;
|
| 303 |
+
const x2 = Math.random() * canvas.width;
|
| 304 |
+
const y2 = Math.random() * canvas.height;
|
| 305 |
+
|
| 306 |
+
ctx.beginPath();
|
| 307 |
+
ctx.moveTo(x1, y1);
|
| 308 |
+
ctx.lineTo(x2, y2);
|
| 309 |
+
ctx.stroke();
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
requestAnimationFrame(animate);
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
animate();
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
window.addEventListener('load', createNeuralNetwork);
|
| 319 |
+
</script>
|
| 320 |
+
</div>
|
| 321 |
+
""")
|
| 322 |
+
|
| 323 |
+
with gr.Tabs(elem_classes="tab-nav"):
|
| 324 |
+
with gr.Tab("PlayAI"):
|
| 325 |
+
demo_playai.render()
|
| 326 |
+
with gr.Tab("Grok"):
|
| 327 |
+
demo_grok.render()
|
| 328 |
+
with gr.Tab("Hyperbolic"):
|
| 329 |
+
demo_hyperbolic.render()
|
| 330 |
+
gr.Markdown(
|
| 331 |
+
"""
|
| 332 |
+
<div>
|
| 333 |
+
<img src="https://storage.googleapis.com/public-arena-asset/hyperbolic_logo.png" alt="Hyperbolic Logo" style="height: 50px; margin-right: 10px;">
|
| 334 |
+
</div>
|
| 335 |
+
|
| 336 |
+
**Note:** This model is supported by Hyperbolic. Build your AI apps at [Hyperbolic](https://app.hyperbolic.xyz/).
|
| 337 |
+
"""
|
| 338 |
+
)
|
| 339 |
+
with gr.Tab("Gemini"):
|
| 340 |
+
demo_gemini.render()
|
| 341 |
+
with gr.Tab("ChatGPT"):
|
| 342 |
+
demo_openai.render()
|
| 343 |
+
with gr.Tab("Claude"):
|
| 344 |
+
demo_claude.render()
|
| 345 |
+
with gr.Tab("Qwen"):
|
| 346 |
+
demo_qwen.render()
|
| 347 |
+
with gr.Tab("Allen AI"):
|
| 348 |
+
demo_allenai.render()
|
| 349 |
+
with gr.Tab("Perplexity"):
|
| 350 |
+
demo_perplexity.render()
|
| 351 |
+
with gr.Tab("Experimental"):
|
| 352 |
+
demo_experimental.render()
|
| 353 |
+
with gr.Tab("Meta Llama"):
|
| 354 |
+
demo_sambanova.render()
|
| 355 |
+
gr.Markdown(
|
| 356 |
+
"**Note:** You need to use a SambaNova API key from [SambaNova Cloud](https://cloud.sambanova.ai/)."
|
| 357 |
+
)
|
| 358 |
+
with gr.Tab("Marco-o1"):
|
| 359 |
+
demo_marco_o1.render()
|
| 360 |
+
with gr.Tab("LTX Video"):
|
| 361 |
+
demo_ltx_video.render()
|
| 362 |
+
with gr.Tab("Groq"):
|
| 363 |
+
demo_groq.render()
|
| 364 |
+
with gr.Tab("Mistral"):
|
| 365 |
+
demo_mistral.render()
|
| 366 |
+
with gr.Tab("Fireworks"):
|
| 367 |
+
demo_fireworks.render()
|
| 368 |
+
with gr.Tab("Together"):
|
| 369 |
+
demo_together.render()
|
| 370 |
+
with gr.Tab("NVIDIA"):
|
| 371 |
+
demo_nvidia.render()
|
| 372 |
+
with gr.Tab("Flux"):
|
| 373 |
+
demo_flux.render()
|
| 374 |
|
| 375 |
if __name__ == "__main__":
|
| 376 |
demo.queue(api_open=False).launch(ssr_mode=False, show_api=False)
|