Spaces:
Running
Running
Solomon7890-jpeg
commited on
Commit
·
5d4dcae
1
Parent(s):
1ac8c6d
fix(ui): random logo on refresh and cleaner logo CSS
Browse files
app.py
CHANGED
|
@@ -143,9 +143,10 @@ custom_css = """
|
|
| 143 |
}
|
| 144 |
.logo-circle img {
|
| 145 |
border-radius: 50% !important;
|
| 146 |
-
box-shadow: 0
|
| 147 |
-
border:
|
| 148 |
object-fit: cover !important;
|
|
|
|
| 149 |
}
|
| 150 |
/* Tab Styling */
|
| 151 |
.tabs button.selected {
|
|
@@ -224,9 +225,14 @@ with demo_with_voice:
|
|
| 224 |
next_index = (current_index + 1) % 3
|
| 225 |
return logo_paths[next_index], next_index
|
| 226 |
|
| 227 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
demo_with_voice.load(
|
| 229 |
-
fn=
|
| 230 |
outputs=[rotating_logo, logo_index_state]
|
| 231 |
)
|
| 232 |
|
|
|
|
| 143 |
}
|
| 144 |
.logo-circle img {
|
| 145 |
border-radius: 50% !important;
|
| 146 |
+
box-shadow: 0 8px 32px rgba(255, 215, 0, 0.4) !important;
|
| 147 |
+
border: 4px solid #FFD700 !important;
|
| 148 |
object-fit: cover !important;
|
| 149 |
+
image-rendering: high-quality !important;
|
| 150 |
}
|
| 151 |
/* Tab Styling */
|
| 152 |
.tabs button.selected {
|
|
|
|
| 225 |
next_index = (current_index + 1) % 3
|
| 226 |
return logo_paths[next_index], next_index
|
| 227 |
|
| 228 |
+
# Function to get random logo on load
|
| 229 |
+
def get_random_logo():
|
| 230 |
+
import random
|
| 231 |
+
return random.choice(logo_paths), 0
|
| 232 |
+
|
| 233 |
+
# Set up automatic rotation on load (pick random)
|
| 234 |
demo_with_voice.load(
|
| 235 |
+
fn=get_random_logo,
|
| 236 |
outputs=[rotating_logo, logo_index_state]
|
| 237 |
)
|
| 238 |
|