Spaces:
Running
on
Zero
Running
on
Zero
Joseph Pollack
commited on
adds various example screenshots
Browse files
app.py
CHANGED
|
@@ -203,16 +203,20 @@ def load_example_episodes():
|
|
| 203 |
examples = []
|
| 204 |
|
| 205 |
try:
|
| 206 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
-
for episode_dir in
|
| 209 |
try:
|
| 210 |
metadata_path = f"extracted_episodes_duckdb/{episode_dir}/metadata.json"
|
| 211 |
-
image_path = f"extracted_episodes_duckdb/{episode_dir}/screenshots/
|
| 212 |
|
| 213 |
# Check if both files exist
|
| 214 |
if os.path.exists(metadata_path) and os.path.exists(image_path):
|
| 215 |
-
logger.info(f"Loading example from {episode_dir}")
|
| 216 |
|
| 217 |
with open(metadata_path, "r") as f:
|
| 218 |
metadata = json.load(f)
|
|
|
|
| 203 |
examples = []
|
| 204 |
|
| 205 |
try:
|
| 206 |
+
episode_screenshots = {
|
| 207 |
+
"episode_13": 3,
|
| 208 |
+
"episode_53": 5,
|
| 209 |
+
"episode_73": 3
|
| 210 |
+
}
|
| 211 |
|
| 212 |
+
for episode_dir, screenshot_num in episode_screenshots.items():
|
| 213 |
try:
|
| 214 |
metadata_path = f"extracted_episodes_duckdb/{episode_dir}/metadata.json"
|
| 215 |
+
image_path = f"extracted_episodes_duckdb/{episode_dir}/screenshots/screenshot_{screenshot_num}.png"
|
| 216 |
|
| 217 |
# Check if both files exist
|
| 218 |
if os.path.exists(metadata_path) and os.path.exists(image_path):
|
| 219 |
+
logger.info(f"Loading example from {episode_dir} using screenshot_{screenshot_num}.png")
|
| 220 |
|
| 221 |
with open(metadata_path, "r") as f:
|
| 222 |
metadata = json.load(f)
|