Spaces:
Sleeping
Sleeping
simple load test
Browse files
engine.py
CHANGED
|
@@ -11,6 +11,9 @@ from typing import Dict, List, Optional
|
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
|
| 13 |
DEFAULT_BACKGROUND = "https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1200&q=80"
|
|
|
|
|
|
|
|
|
|
| 14 |
POSITION_OFFSETS = {
|
| 15 |
"left": "20%",
|
| 16 |
"center": "50%",
|
|
|
|
| 11 |
logger = logging.getLogger(__name__)
|
| 12 |
|
| 13 |
DEFAULT_BACKGROUND = "https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1200&q=80"
|
| 14 |
+
|
| 15 |
+
# Test URL to verify external images work
|
| 16 |
+
TEST_IMAGE_URL = "https://picsum.photos/1200/800"
|
| 17 |
POSITION_OFFSETS = {
|
| 18 |
"left": "20%",
|
| 19 |
"center": "50%",
|
story.py
CHANGED
|
@@ -12,6 +12,7 @@ from engine import (
|
|
| 12 |
sprite_asset,
|
| 13 |
audio_asset,
|
| 14 |
create_sprite_data_url,
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
|
|
@@ -31,8 +32,10 @@ def build_sample_story() -> List[SceneState]:
|
|
| 31 |
),
|
| 32 |
]
|
| 33 |
)
|
|
|
|
| 34 |
builder.set_background(
|
| 35 |
-
|
|
|
|
| 36 |
)
|
| 37 |
builder.set_stage(background_asset("p60-back-cover.png"))
|
| 38 |
|
|
|
|
| 12 |
sprite_asset,
|
| 13 |
audio_asset,
|
| 14 |
create_sprite_data_url,
|
| 15 |
+
TEST_IMAGE_URL,
|
| 16 |
)
|
| 17 |
|
| 18 |
|
|
|
|
| 32 |
),
|
| 33 |
]
|
| 34 |
)
|
| 35 |
+
# TEST: Use a known-working external URL to test if external images work at all
|
| 36 |
builder.set_background(
|
| 37 |
+
TEST_IMAGE_URL, # Testing with picsum.photos
|
| 38 |
+
label="Test External Image"
|
| 39 |
)
|
| 40 |
builder.set_stage(background_asset("p60-back-cover.png"))
|
| 41 |
|