Update app.py
Browse files
app.py
CHANGED
|
@@ -323,11 +323,7 @@ dino_image_cache = {}
|
|
| 323 |
def load_rise_fall_slideshow(api_key):
|
| 324 |
"""Load cached dinosaur slideshow demo and hide the demo button and instruction."""
|
| 325 |
global dino_audio_cache, dino_image_cache
|
| 326 |
-
|
| 327 |
-
# API key is required even for demo
|
| 328 |
-
if not api_key:
|
| 329 |
-
raise gr.Error("Please enter your Gemini API key first")
|
| 330 |
-
|
| 331 |
# Clear any previous cache
|
| 332 |
dino_audio_cache = {}
|
| 333 |
dino_image_cache = {}
|
|
@@ -450,7 +446,6 @@ with gr.Blocks(
|
|
| 450 |
"""<div class="api-key-note">
|
| 451 |
<strong>Note:</strong> You need a Gemini API key with billing enabled to use this app.<br>
|
| 452 |
Get your API key from <a href="https://aistudio.google.com/app/apikey" target="_blank">Google AI Studio</a>.<br>
|
| 453 |
-
<em>Important: Make sure to enable billing on your Google Cloud account for API access.</em>
|
| 454 |
</div>"""
|
| 455 |
)
|
| 456 |
|
|
|
|
| 323 |
def load_rise_fall_slideshow(api_key):
|
| 324 |
"""Load cached dinosaur slideshow demo and hide the demo button and instruction."""
|
| 325 |
global dino_audio_cache, dino_image_cache
|
| 326 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
# Clear any previous cache
|
| 328 |
dino_audio_cache = {}
|
| 329 |
dino_image_cache = {}
|
|
|
|
| 446 |
"""<div class="api-key-note">
|
| 447 |
<strong>Note:</strong> You need a Gemini API key with billing enabled to use this app.<br>
|
| 448 |
Get your API key from <a href="https://aistudio.google.com/app/apikey" target="_blank">Google AI Studio</a>.<br>
|
|
|
|
| 449 |
</div>"""
|
| 450 |
)
|
| 451 |
|