Upload 20 files
Browse files- HF_RUNTIME_FIX_RECEIPT_8.md +44 -0
- HF_Substrate_Video_Atomization_Runtime_v0_1_1_DATA_HOLOGRAM_STRUCTURE_PATCH.zip.sha256 +1 -0
- README.md +57 -6
- app.py +240 -17
- demo_contract.json +16 -4
- docs/DATA_HOLOGRAM_STRUCTURE_v0_2.md +78 -0
- docs/resonant_ingress_v0_1_1_reference.txt +1038 -0
- docs/runtime_trail_robot_day_loop_v0_1_reference.html +562 -0
HF_RUNTIME_FIX_RECEIPT_8.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HF Runtime Patch Receipt 8 β Data Hologram Structure v0.2
|
| 2 |
+
|
| 3 |
+
## Patch name
|
| 4 |
+
|
| 5 |
+
HF_Substrate_Video_Atomization_Runtime_v0_1_1_DATA_HOLOGRAM_STRUCTURE_PATCH
|
| 6 |
+
|
| 7 |
+
## Status
|
| 8 |
+
|
| 9 |
+
HELD_FOR_UPLOAD
|
| 10 |
+
|
| 11 |
+
## What changed
|
| 12 |
+
|
| 13 |
+
- Added Data Hologram v0.2 schema to the runtime output.
|
| 14 |
+
- Added a dedicated `Data Hologram v0.2` UI tab.
|
| 15 |
+
- Added Runtime Trail loop law: `pressure β gate β capsule β route β action/review β receipt β readiness`.
|
| 16 |
+
- Added video-specific atomization loop law.
|
| 17 |
+
- Added Resonant Ingress trace law.
|
| 18 |
+
- Added provenance policy: `PROVENANCE_IS_PART_OF_THE_DATA`.
|
| 19 |
+
- Added rehydration boundary: `REVIEW_SURFACE_ONLY`.
|
| 20 |
+
- Added anti-laundering rules for source, frame, scene, motion, provenance, memory, and human validation.
|
| 21 |
+
- Added Data Hologram manifest export: `manifests/source_bound_data_hologram_v0_2.json`.
|
| 22 |
+
- Added reference docs for Runtime Trail and Resonant Ingress.
|
| 23 |
+
- Kept browser-safe preview rehydration and social card metadata.
|
| 24 |
+
|
| 25 |
+
## What did not change
|
| 26 |
+
|
| 27 |
+
- No source video mutation.
|
| 28 |
+
- No source replacement claim.
|
| 29 |
+
- No codec replacement claim.
|
| 30 |
+
- No physical hologram generation claim.
|
| 31 |
+
- No automatic truth / identity / intent / settlement claim.
|
| 32 |
+
- No removal of human validation.
|
| 33 |
+
|
| 34 |
+
## Canonical boundary
|
| 35 |
+
|
| 36 |
+
`SOURCE_VIDEO_REMAINS_AUTHORITY`
|
| 37 |
+
|
| 38 |
+
## Receipt boundary
|
| 39 |
+
|
| 40 |
+
`PROVENANCE_IS_PART_OF_THE_DATA`
|
| 41 |
+
|
| 42 |
+
## Human settlement
|
| 43 |
+
|
| 44 |
+
`HUMAN_VALIDATION_REQUIRED`
|
HF_Substrate_Video_Atomization_Runtime_v0_1_1_DATA_HOLOGRAM_STRUCTURE_PATCH.zip.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
cc7727e72980aee981b1f2cc8952aa3029b27254878f9178403829e9949378c0 /mnt/data/HF_Substrate_Video_Atomization_Runtime_v0_1_1_DATA_HOLOGRAM_STRUCTURE_PATCH.zip
|
README.md
CHANGED
|
@@ -15,9 +15,9 @@ thumbnail: assets/social_card.png
|
|
| 15 |
|
| 16 |
# Substrate Video Atomization Runtime v0.1.1
|
| 17 |
|
| 18 |
-
Upload a short video and run a source-bound atomization route. v0.1.1 adds browser-safe preview rehydration
|
| 19 |
|
| 20 |
-
This Space demonstrates Video Atomization, Trace-Stack Rehydration, and Data Hologram formation as a Substrate Mesh runtime surface. The uploaded video is not treated as a monolithic compressed payload. Instead, the runtime hashes the source, samples frame atoms, detects scene intervals, records motion deltas, applies trace capsules, stacks the traces, and returns a rehydrated review surface with an HIR Γ OAM receipt.
|
| 21 |
|
| 22 |
The demo shows how video can become a pressure-readable temporal mesh:
|
| 23 |
|
|
@@ -25,24 +25,41 @@ The demo shows how video can become a pressure-readable temporal mesh:
|
|
| 25 |
source video
|
| 26 |
β source capsule
|
| 27 |
β frame atoms
|
|
|
|
| 28 |
β scene atoms
|
| 29 |
β trace capsules
|
| 30 |
-
β
|
| 31 |
-
β data hologram manifest
|
| 32 |
β rehydrated review surface
|
|
|
|
| 33 |
β human validation capsule
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
## Boundary
|
| 37 |
|
| 38 |
-
This is not video compression, not a replacement for codecs, and not a physical hologram generator. This v0.1 Space demonstrates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## What the demo proves
|
| 41 |
|
| 42 |
- The source video is hashed and held as the canonical anchor.
|
| 43 |
- The video is atomized into source-bound frame and scene atoms.
|
| 44 |
- Each sampled atom receives a trace capsule.
|
| 45 |
-
- Trace capsules are stacked into a
|
|
|
|
| 46 |
- The rehydrated output remains a review surface, not a source replacement.
|
| 47 |
- Human validation remains required before settlement.
|
| 48 |
|
|
@@ -71,3 +88,37 @@ thumbnail: assets/social_card.png
|
|
| 71 |
```
|
| 72 |
|
| 73 |
The image is a 1200 Γ 630 social-card render for link preview surfaces. It is display metadata only; it does not alter runtime atomization, trace stack, receipt, preview, or packet logic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Substrate Video Atomization Runtime v0.1.1
|
| 17 |
|
| 18 |
+
Upload a short video and run a source-bound atomization route. v0.1.1 adds browser-safe preview rehydration, social-card metadata, and Data Hologram Structure v0.2.
|
| 19 |
|
| 20 |
+
This Space demonstrates Video Atomization, Trace-Stack Rehydration, and source-bound Data Hologram formation as a Substrate Mesh runtime surface. The uploaded video is not treated as a monolithic compressed payload. Instead, the runtime hashes the source, samples frame atoms, detects scene intervals, records motion deltas, applies trace capsules, stacks the traces, carries provenance as part of the data, and returns a rehydrated review surface with an HIR Γ OAM receipt.
|
| 21 |
|
| 22 |
The demo shows how video can become a pressure-readable temporal mesh:
|
| 23 |
|
|
|
|
| 25 |
source video
|
| 26 |
β source capsule
|
| 27 |
β frame atoms
|
| 28 |
+
β motion atoms
|
| 29 |
β scene atoms
|
| 30 |
β trace capsules
|
| 31 |
+
β source-bound data hologram v0.2
|
|
|
|
| 32 |
β rehydrated review surface
|
| 33 |
+
β HIR Γ OAM receipt
|
| 34 |
β human validation capsule
|
| 35 |
```
|
| 36 |
|
| 37 |
+
Operating law:
|
| 38 |
+
|
| 39 |
+
```text
|
| 40 |
+
media pressure β atom gate β frame/scene/motion capsule β transfer route β rehydration surface β receipt β human validation / memory readiness
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
## Boundary
|
| 44 |
|
| 45 |
+
This is not video compression, not a replacement for codecs, and not a physical hologram generator. This v0.1.1 Space demonstrates atomized transfer, source-return rehydration, provenance-aware receipts, and a source-bound data-hologram review layer. Physical hologram translation would require a later optical modulation layer.
|
| 46 |
+
|
| 47 |
+
Core boundary:
|
| 48 |
+
|
| 49 |
+
```text
|
| 50 |
+
SOURCE_VIDEO_REMAINS_AUTHORITY
|
| 51 |
+
PROVENANCE_IS_PART_OF_THE_DATA
|
| 52 |
+
REHYDRATION_SURFACE_ONLY
|
| 53 |
+
HUMAN_VALIDATION_REQUIRED
|
| 54 |
+
```
|
| 55 |
|
| 56 |
## What the demo proves
|
| 57 |
|
| 58 |
- The source video is hashed and held as the canonical anchor.
|
| 59 |
- The video is atomized into source-bound frame and scene atoms.
|
| 60 |
- Each sampled atom receives a trace capsule.
|
| 61 |
+
- Trace capsules are stacked into a Data Hologram v0.2 manifest.
|
| 62 |
+
- Provenance is carried as part of the data, not as a detachable afterthought.
|
| 63 |
- The rehydrated output remains a review surface, not a source replacement.
|
| 64 |
- Human validation remains required before settlement.
|
| 65 |
|
|
|
|
| 88 |
```
|
| 89 |
|
| 90 |
The image is a 1200 Γ 630 social-card render for link preview surfaces. It is display metadata only; it does not alter runtime atomization, trace stack, receipt, preview, or packet logic.
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
## Data Hologram Structure v0.2
|
| 94 |
+
|
| 95 |
+
This packet adds `manifests/source_bound_data_hologram_v0_2.json` to every run packet.
|
| 96 |
+
|
| 97 |
+
The structure includes:
|
| 98 |
+
|
| 99 |
+
- Runtime Trail loop law
|
| 100 |
+
- Resonant Ingress trace law
|
| 101 |
+
- source-return boundary
|
| 102 |
+
- provenance survival state
|
| 103 |
+
- anti-laundering rules
|
| 104 |
+
- memory-readiness boundary
|
| 105 |
+
- human-validation questions
|
| 106 |
+
|
| 107 |
+
Review question set:
|
| 108 |
+
|
| 109 |
+
```text
|
| 110 |
+
What arrived?
|
| 111 |
+
What held?
|
| 112 |
+
What degraded?
|
| 113 |
+
What provenance survived?
|
| 114 |
+
What needs repair?
|
| 115 |
+
What still requires human validation?
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
## Reference documents
|
| 119 |
+
|
| 120 |
+
This release includes local reference docs under `docs/`:
|
| 121 |
+
|
| 122 |
+
- `DATA_HOLOGRAM_STRUCTURE_v0_2.md`
|
| 123 |
+
- `runtime_trail_robot_day_loop_v0_1_reference.html`
|
| 124 |
+
- `resonant_ingress_v0_1_1_reference.txt`
|
app.py
CHANGED
|
@@ -43,9 +43,34 @@ APP_TITLE = "Substrate Video Atomization Runtime v0.1.1"
|
|
| 43 |
BOUNDARY_NOTE = (
|
| 44 |
"This demo performs source-bound video atomization and trace-stack rehydration. "
|
| 45 |
"It is not video compression, not a codec replacement, and not a physical hologram generator. "
|
| 46 |
-
"The output is a data-hologram review surface with receipts."
|
|
|
|
| 47 |
)
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
def sha256_file(path: str) -> str:
|
| 51 |
h = hashlib.sha256()
|
|
@@ -181,7 +206,7 @@ def classify_pressure(motion_delta: float, scene_threshold: float) -> str:
|
|
| 181 |
return "HELD"
|
| 182 |
|
| 183 |
|
| 184 |
-
def build_markdown_receipt(receipt: dict, source_capsule: dict, trace_stack: dict) -> str:
|
| 185 |
lines = [
|
| 186 |
"# HIR Γ OAM Video Atomization Receipt",
|
| 187 |
"",
|
|
@@ -193,6 +218,7 @@ def build_markdown_receipt(receipt: dict, source_capsule: dict, trace_stack: dic
|
|
| 193 |
f"- Trace-stack state: `{receipt['trace_stack_state']}`",
|
| 194 |
f"- Data-hologram state: `{receipt['data_hologram_state']}`",
|
| 195 |
f"- Human review: `{receipt['human_review']}`",
|
|
|
|
| 196 |
"",
|
| 197 |
"## Source",
|
| 198 |
"",
|
|
@@ -202,6 +228,14 @@ def build_markdown_receipt(receipt: dict, source_capsule: dict, trace_stack: dic
|
|
| 202 |
f"- FPS: `{source_capsule.get('fps')}`",
|
| 203 |
f"- Frame count: `{source_capsule.get('frame_count')}`",
|
| 204 |
"",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
"## Boundary",
|
| 206 |
"",
|
| 207 |
BOUNDARY_NOTE,
|
|
@@ -211,6 +245,21 @@ def build_markdown_receipt(receipt: dict, source_capsule: dict, trace_stack: dic
|
|
| 211 |
]
|
| 212 |
for layer in trace_stack.get("stack_layers", []):
|
| 213 |
lines.append(f"- `{layer}`")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
lines.extend([
|
| 215 |
"",
|
| 216 |
"## Settlement",
|
|
@@ -230,6 +279,123 @@ def create_run_packet(run_dir: Path, packet_name: str = "video_atomization_run_p
|
|
| 230 |
return str(packet_path)
|
| 231 |
|
| 232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, max_frame_atoms=72):
|
| 234 |
source_video_path = coerce_uploaded_path(video_path)
|
| 235 |
if not source_video_path:
|
|
@@ -239,6 +405,7 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 239 |
{"error": "No video uploaded."},
|
| 240 |
empty,
|
| 241 |
empty,
|
|
|
|
| 242 |
{"error": "No trace stack generated."},
|
| 243 |
{"error": "No receipt generated."},
|
| 244 |
{"human_validation_state": "NOT_AVAILABLE"},
|
|
@@ -271,6 +438,7 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 271 |
{"error": "OpenCV could not read this video. Try MP4/H.264, WebM, or MOV."},
|
| 272 |
empty,
|
| 273 |
empty,
|
|
|
|
| 274 |
{"error": "No trace stack generated."},
|
| 275 |
{"error": "No receipt generated."},
|
| 276 |
{"human_validation_state": "NOT_AVAILABLE"},
|
|
@@ -335,7 +503,10 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 335 |
"time": format_time(timestamp),
|
| 336 |
"source_video_sha256": source_hash,
|
| 337 |
"motion_delta": round(motion_delta, 6),
|
| 338 |
-
"pressure_state": pressure_state
|
|
|
|
|
|
|
|
|
|
| 339 |
})
|
| 340 |
|
| 341 |
if motion_delta >= scene_threshold:
|
|
@@ -348,7 +519,9 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 348 |
"pressure_state": "HELD_WITH_BOUNDARY",
|
| 349 |
"claim_boundary": "scene interval only; does not support identity, intent, or external-context claim",
|
| 350 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 351 |
-
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM"
|
|
|
|
|
|
|
| 352 |
})
|
| 353 |
scene_index += 1
|
| 354 |
current_scene_start = timestamp
|
|
@@ -377,7 +550,9 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 377 |
"pressure_state": pressure_state,
|
| 378 |
"trace_capsule_state": "CAPSULED_SOURCE_BOUND",
|
| 379 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 380 |
-
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM"
|
|
|
|
|
|
|
| 381 |
}
|
| 382 |
frame_atoms.append(atom)
|
| 383 |
gallery_items.append((str(img_path), atom["atom_id"]))
|
|
@@ -398,7 +573,9 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 398 |
"pressure_state": "HELD",
|
| 399 |
"claim_boundary": "scene interval only; does not support identity, intent, or external-context claim",
|
| 400 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 401 |
-
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM"
|
|
|
|
|
|
|
| 402 |
})
|
| 403 |
|
| 404 |
atom_manifest = {
|
|
@@ -423,6 +600,14 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 423 |
}
|
| 424 |
}
|
| 425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
trace_stack = {
|
| 427 |
"manifest_type": "TRACE_STACK_DATA_HOLOGRAM_MANIFEST",
|
| 428 |
"trace_stack_id": "trace_stack_001",
|
|
@@ -435,14 +620,23 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 435 |
"claim_boundaries",
|
| 436 |
"pressure_states",
|
| 437 |
"rehydration_states",
|
|
|
|
|
|
|
| 438 |
"human_validation_state"
|
| 439 |
],
|
|
|
|
|
|
|
| 440 |
"data_hologram_state": "FORMED",
|
|
|
|
| 441 |
"rehydration_state": "REHYDRATED_SOURCE_BOUND_REVIEW_SURFACE",
|
|
|
|
| 442 |
"optical_hologram_state": "NOT_GENERATED_IN_THIS_DEMO",
|
|
|
|
| 443 |
"source_mutation": "BLOCKED",
|
| 444 |
"canonical_anchor": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 445 |
-
"
|
|
|
|
|
|
|
| 446 |
}
|
| 447 |
|
| 448 |
receipt = {
|
|
@@ -458,13 +652,20 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 458 |
"pressure_state": "HELD_WITH_BOUNDARY",
|
| 459 |
"human_review": "REQUIRED",
|
| 460 |
"canonical_anchor": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
"claims_blocked": [
|
| 462 |
"not a codec",
|
| 463 |
"not monolithic compression",
|
| 464 |
"not a physical hologram generator",
|
| 465 |
"not source replacement",
|
| 466 |
-
"not automatic settlement"
|
| 467 |
-
|
|
|
|
|
|
|
|
|
|
| 468 |
}
|
| 469 |
|
| 470 |
human_validation = {
|
|
@@ -481,17 +682,26 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 481 |
"QUARANTINE",
|
| 482 |
"REQUEST_MORE_ATOMS"
|
| 483 |
],
|
| 484 |
-
"settlement_note": "Machine generated route surface only. Human retains settlement authority."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 485 |
}
|
| 486 |
|
| 487 |
write_json(manifests_dir / "source_video_capsule.json", source_capsule)
|
| 488 |
write_json(manifests_dir / "atom_manifest.json", atom_manifest)
|
| 489 |
write_json(manifests_dir / "trace_stack_data_hologram_manifest.json", trace_stack)
|
|
|
|
| 490 |
write_json(manifests_dir / "motion_atoms.json", motion_atoms)
|
| 491 |
write_json(receipts_dir / "hir_oam_video_atomization_receipt.json", receipt)
|
| 492 |
write_json(receipts_dir / "human_validation_capsule.json", human_validation)
|
| 493 |
(receipts_dir / "HIR_OAM_VIDEO_RECEIPT.md").write_text(
|
| 494 |
-
build_markdown_receipt(receipt, source_capsule, trace_stack),
|
| 495 |
encoding="utf-8"
|
| 496 |
)
|
| 497 |
|
|
@@ -503,7 +713,7 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 503 |
summary = (
|
| 504 |
f"Route complete. Source held. {len(frame_atoms)} frame atoms, "
|
| 505 |
f"{len(scene_atoms)} scene atoms, {len(motion_atoms)} motion atoms. "
|
| 506 |
-
"Trace stack formed. Data
|
| 507 |
)
|
| 508 |
|
| 509 |
preview_path = make_preview_mp4(source_video_path, run_dir)
|
|
@@ -513,6 +723,7 @@ def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, ma
|
|
| 513 |
source_capsule,
|
| 514 |
frame_df,
|
| 515 |
scene_df,
|
|
|
|
| 516 |
trace_stack,
|
| 517 |
receipt,
|
| 518 |
human_validation,
|
|
@@ -535,10 +746,12 @@ with gr.Blocks(title=APP_TITLE, css=custom_css) as demo:
|
|
| 535 |
Upload a short video and run a source-bound atomization route.
|
| 536 |
|
| 537 |
This Space hashes the source video, samples frame atoms, detects scene intervals, records motion-delta pressure,
|
| 538 |
-
applies trace capsules, stacks the traces into
|
| 539 |
|
| 540 |
**Boundary:** this is not video compression, not a codec replacement, and not a physical hologram generator.
|
| 541 |
-
This
|
|
|
|
|
|
|
| 542 |
"""
|
| 543 |
)
|
| 544 |
|
|
@@ -551,8 +764,7 @@ This v0.1 Space demonstrates the source-bound data-hologram layer.
|
|
| 551 |
video_output = gr.Video(
|
| 552 |
label="Source video preview / rehydrated browser-safe MP4",
|
| 553 |
format="mp4",
|
| 554 |
-
interactive=False
|
| 555 |
-
show_download_button=True
|
| 556 |
)
|
| 557 |
|
| 558 |
preview_status = gr.Textbox(
|
|
@@ -592,6 +804,13 @@ This v0.1 Space demonstrates the source-bound data-hologram layer.
|
|
| 592 |
interactive=False
|
| 593 |
)
|
| 594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
with gr.Tabs():
|
| 596 |
with gr.Tab("Source Capsule"):
|
| 597 |
source_json = gr.JSON(label="Source Video Capsule")
|
|
@@ -602,7 +821,10 @@ This v0.1 Space demonstrates the source-bound data-hologram layer.
|
|
| 602 |
with gr.Tab("Scene Atoms"):
|
| 603 |
scene_table = gr.Dataframe(label="Scene Trace Capsules", wrap=True)
|
| 604 |
|
| 605 |
-
with gr.Tab("
|
|
|
|
|
|
|
|
|
|
| 606 |
trace_json = gr.JSON(label="Stacked Trace Field")
|
| 607 |
|
| 608 |
with gr.Tab("HIR Γ OAM Receipt"):
|
|
@@ -631,6 +853,7 @@ This v0.1 Space demonstrates the source-bound data-hologram layer.
|
|
| 631 |
source_json,
|
| 632 |
frame_table,
|
| 633 |
scene_table,
|
|
|
|
| 634 |
trace_json,
|
| 635 |
receipt_json,
|
| 636 |
validation_json,
|
|
|
|
| 43 |
BOUNDARY_NOTE = (
|
| 44 |
"This demo performs source-bound video atomization and trace-stack rehydration. "
|
| 45 |
"It is not video compression, not a codec replacement, and not a physical hologram generator. "
|
| 46 |
+
"The output is a source-bound data-hologram review surface with receipts. "
|
| 47 |
+
"The source video remains authority."
|
| 48 |
)
|
| 49 |
|
| 50 |
+
DATA_HOLOGRAM_VERSION = "0.2"
|
| 51 |
+
RUNTIME_TRAIL_LOOP_LAW = (
|
| 52 |
+
"pressure β gate β capsule β route β action/review β receipt β readiness"
|
| 53 |
+
)
|
| 54 |
+
VIDEO_ATOMIZATION_LOOP_LAW = (
|
| 55 |
+
"media pressure β atom gate β frame/scene/motion capsule β transfer route "
|
| 56 |
+
"β rehydration surface β receipt β human validation / memory readiness"
|
| 57 |
+
)
|
| 58 |
+
RESONANT_INGRESS_TRACE_LAW = (
|
| 59 |
+
"signal β bounded ingress β trace capsule β fusion/relation layer β pressure form "
|
| 60 |
+
"β route integrity β OAM scan β human validation"
|
| 61 |
+
)
|
| 62 |
+
PROVENANCE_POLICY = "PROVENANCE_IS_PART_OF_THE_DATA"
|
| 63 |
+
REHYDRATION_BOUNDARY = "REVIEW_SURFACE_ONLY"
|
| 64 |
+
ANTI_LAUNDERING_RULES = [
|
| 65 |
+
"no frame atom becomes source replacement",
|
| 66 |
+
"no scene atom becomes identity, intent, or external-context claim",
|
| 67 |
+
"no motion atom becomes identity, intent, or causality claim",
|
| 68 |
+
"no provenance loss hidden by successful transfer",
|
| 69 |
+
"no rehydration surface becomes final settlement",
|
| 70 |
+
"no memory candidate without receipt",
|
| 71 |
+
"human validation remains settlement authority",
|
| 72 |
+
]
|
| 73 |
+
|
| 74 |
|
| 75 |
def sha256_file(path: str) -> str:
|
| 76 |
h = hashlib.sha256()
|
|
|
|
| 206 |
return "HELD"
|
| 207 |
|
| 208 |
|
| 209 |
+
def build_markdown_receipt(receipt: dict, source_capsule: dict, trace_stack: dict, data_hologram: dict | None = None) -> str:
|
| 210 |
lines = [
|
| 211 |
"# HIR Γ OAM Video Atomization Receipt",
|
| 212 |
"",
|
|
|
|
| 218 |
f"- Trace-stack state: `{receipt['trace_stack_state']}`",
|
| 219 |
f"- Data-hologram state: `{receipt['data_hologram_state']}`",
|
| 220 |
f"- Human review: `{receipt['human_review']}`",
|
| 221 |
+
f"- Provenance policy: `{receipt.get('provenance_policy', PROVENANCE_POLICY)}`",
|
| 222 |
"",
|
| 223 |
"## Source",
|
| 224 |
"",
|
|
|
|
| 228 |
f"- FPS: `{source_capsule.get('fps')}`",
|
| 229 |
f"- Frame count: `{source_capsule.get('frame_count')}`",
|
| 230 |
"",
|
| 231 |
+
"## Data Hologram v0.2 law",
|
| 232 |
+
"",
|
| 233 |
+
f"- Runtime Trail loop: `{RUNTIME_TRAIL_LOOP_LAW}`",
|
| 234 |
+
f"- Video atomization loop: `{VIDEO_ATOMIZATION_LOOP_LAW}`",
|
| 235 |
+
f"- Resonant Ingress trace law: `{RESONANT_INGRESS_TRACE_LAW}`",
|
| 236 |
+
f"- Rehydration boundary: `{REHYDRATION_BOUNDARY}`",
|
| 237 |
+
"- Provenance is part of the data and must not be silently flattened during transfer.",
|
| 238 |
+
"",
|
| 239 |
"## Boundary",
|
| 240 |
"",
|
| 241 |
BOUNDARY_NOTE,
|
|
|
|
| 245 |
]
|
| 246 |
for layer in trace_stack.get("stack_layers", []):
|
| 247 |
lines.append(f"- `{layer}`")
|
| 248 |
+
if data_hologram:
|
| 249 |
+
lines.extend([
|
| 250 |
+
"",
|
| 251 |
+
"## Hologram preservation fields",
|
| 252 |
+
"",
|
| 253 |
+
])
|
| 254 |
+
for field in data_hologram.get("preservation_fields", []):
|
| 255 |
+
lines.append(f"- `{field}`")
|
| 256 |
+
lines.extend([
|
| 257 |
+
"",
|
| 258 |
+
"## Anti-laundering rules",
|
| 259 |
+
"",
|
| 260 |
+
])
|
| 261 |
+
for rule in ANTI_LAUNDERING_RULES:
|
| 262 |
+
lines.append(f"- {rule}")
|
| 263 |
lines.extend([
|
| 264 |
"",
|
| 265 |
"## Settlement",
|
|
|
|
| 279 |
return str(packet_path)
|
| 280 |
|
| 281 |
|
| 282 |
+
def build_data_hologram_manifest(source_capsule: dict, atom_manifest: dict, frame_atoms: list, scene_atoms: list, motion_atoms: list) -> dict:
|
| 283 |
+
"""Build the source-bound review-surface structure for Data Hologram v0.2."""
|
| 284 |
+
source_hash = source_capsule.get("sha256")
|
| 285 |
+
motion_values = [safe_float(m.get("motion_delta"), 0.0) for m in motion_atoms]
|
| 286 |
+
max_motion = max(motion_values) if motion_values else 0.0
|
| 287 |
+
avg_motion = sum(motion_values) / len(motion_values) if motion_values else 0.0
|
| 288 |
+
strained_motion_atoms = [m for m in motion_atoms if str(m.get("pressure_state", "")).startswith("STRAINED")]
|
| 289 |
+
|
| 290 |
+
return {
|
| 291 |
+
"manifest_type": "SOURCE_BOUND_DATA_HOLOGRAM_MANIFEST",
|
| 292 |
+
"schema_version": DATA_HOLOGRAM_VERSION,
|
| 293 |
+
"hologram_type": "SOURCE_BOUND_DATA_HOLOGRAM",
|
| 294 |
+
"hologram_state": "FORMED",
|
| 295 |
+
"source_video_sha256": source_hash,
|
| 296 |
+
"canonical_anchor": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 297 |
+
"source_mutation": "BLOCKED",
|
| 298 |
+
"transfer_mode": "ATOMIZED_SOURCE_STRUCTURE",
|
| 299 |
+
"rehydration_boundary": REHYDRATION_BOUNDARY,
|
| 300 |
+
"rehydration_state": "REHYDRATED_SOURCE_BOUND_REVIEW_SURFACE",
|
| 301 |
+
"optical_hologram_state": "NOT_GENERATED_IN_THIS_DEMO",
|
| 302 |
+
"provenance_policy": PROVENANCE_POLICY,
|
| 303 |
+
"source_account_boundary": {
|
| 304 |
+
"source_remains_authority": True,
|
| 305 |
+
"rehydration_is_review_surface_only": True,
|
| 306 |
+
"atomized_layer_replaces_source": False,
|
| 307 |
+
"automatic_settlement": False,
|
| 308 |
+
"human_validation_required": True,
|
| 309 |
+
},
|
| 310 |
+
"operating_laws": {
|
| 311 |
+
"runtime_trail_loop": RUNTIME_TRAIL_LOOP_LAW,
|
| 312 |
+
"video_atomization_loop": VIDEO_ATOMIZATION_LOOP_LAW,
|
| 313 |
+
"resonant_ingress_trace_law": RESONANT_INGRESS_TRACE_LAW,
|
| 314 |
+
},
|
| 315 |
+
"preservation_fields": [
|
| 316 |
+
"source_hash",
|
| 317 |
+
"frame_position",
|
| 318 |
+
"timestamp",
|
| 319 |
+
"motion_delta_pressure",
|
| 320 |
+
"scene_interval_closure",
|
| 321 |
+
"claim_boundary",
|
| 322 |
+
"provenance_reference",
|
| 323 |
+
"source_return_context",
|
| 324 |
+
"human_validation_state",
|
| 325 |
+
],
|
| 326 |
+
"ingress_accounts": [
|
| 327 |
+
{
|
| 328 |
+
"ingress_type": "bounded_visual_trace",
|
| 329 |
+
"runtime_name": "frame_atoms",
|
| 330 |
+
"count": len(frame_atoms),
|
| 331 |
+
"account_boundary": "sampled frame only; does not support full-scene, identity, intent, or external-context claim",
|
| 332 |
+
"capsule_state": "CAPSULED_SOURCE_BOUND",
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"ingress_type": "temporal_pressure_trace",
|
| 336 |
+
"runtime_name": "motion_delta_atoms",
|
| 337 |
+
"count": len(motion_atoms),
|
| 338 |
+
"max_motion_delta": round(max_motion, 6),
|
| 339 |
+
"average_motion_delta": round(avg_motion, 6),
|
| 340 |
+
"strained_count": len(strained_motion_atoms),
|
| 341 |
+
"account_boundary": "motion pressure only; does not support identity, intent, causality, or external-context claim",
|
| 342 |
+
},
|
| 343 |
+
{
|
| 344 |
+
"ingress_type": "interval_closure_trace",
|
| 345 |
+
"runtime_name": "scene_atoms",
|
| 346 |
+
"count": len(scene_atoms),
|
| 347 |
+
"account_boundary": "scene interval only; does not support identity, intent, or external-context claim",
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"ingress_type": "provenance_trace",
|
| 351 |
+
"runtime_name": "source_return_context",
|
| 352 |
+
"count": 1,
|
| 353 |
+
"account_boundary": "provenance is carried as source-bound receipt context, not as automatic truth or final settlement",
|
| 354 |
+
},
|
| 355 |
+
],
|
| 356 |
+
"trace_fusion_review": {
|
| 357 |
+
"fusion_mode": "GATED_RELATION_REVIEW_NOT_CONFIDENCE_BLEND",
|
| 358 |
+
"frame_atoms_may_enter": "ONLY_AS_SOURCE_BOUND_VISUAL_TRACE",
|
| 359 |
+
"motion_atoms_may_enter": "ONLY_AS_TEMPORAL_PRESSURE_TRACE",
|
| 360 |
+
"scene_atoms_may_enter": "ONLY_AS_INTERVAL_CLOSURE_TRACE",
|
| 361 |
+
"provenance_may_enter": "ONLY_AS_RECEIPT_BOUND_SOURCE_RETURN_CONTEXT",
|
| 362 |
+
"strained_accounts_visible": True,
|
| 363 |
+
"must_stop_accounts_laundered": False,
|
| 364 |
+
},
|
| 365 |
+
"route_integrity": {
|
| 366 |
+
"atom_manifest_state": "FORMED",
|
| 367 |
+
"trace_stack_state": "STACKED",
|
| 368 |
+
"source_return_state": "PRESENT",
|
| 369 |
+
"provenance_survival_state": "RECEIPT_BOUND",
|
| 370 |
+
"review_surface_state": "GENERATED",
|
| 371 |
+
},
|
| 372 |
+
"anti_laundering_rules": ANTI_LAUNDERING_RULES,
|
| 373 |
+
"memory_readiness_candidate": {
|
| 374 |
+
"state": "ELIGIBLE_ONLY_AFTER_HUMAN_VALIDATION",
|
| 375 |
+
"law": "memory can prime readiness; memory does not grant permission",
|
| 376 |
+
"quarantine_required_if": [
|
| 377 |
+
"source hash mismatch",
|
| 378 |
+
"missing atom receipt",
|
| 379 |
+
"provenance break hidden by transfer",
|
| 380 |
+
"human validation rejected",
|
| 381 |
+
],
|
| 382 |
+
},
|
| 383 |
+
"human_validation": {
|
| 384 |
+
"state": "REQUIRED",
|
| 385 |
+
"settlement_authority": "HUMAN",
|
| 386 |
+
"review_questions": [
|
| 387 |
+
"What arrived?",
|
| 388 |
+
"What held?",
|
| 389 |
+
"What degraded?",
|
| 390 |
+
"What provenance survived?",
|
| 391 |
+
"What needs repair?",
|
| 392 |
+
"What still requires human validation?",
|
| 393 |
+
],
|
| 394 |
+
},
|
| 395 |
+
"atom_counts": atom_manifest.get("atom_counts", {}),
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
|
| 399 |
def atomize_video(video_path, sample_every_seconds=1.0, scene_threshold=32.0, max_frame_atoms=72):
|
| 400 |
source_video_path = coerce_uploaded_path(video_path)
|
| 401 |
if not source_video_path:
|
|
|
|
| 405 |
{"error": "No video uploaded."},
|
| 406 |
empty,
|
| 407 |
empty,
|
| 408 |
+
{"error": "No data hologram generated."},
|
| 409 |
{"error": "No trace stack generated."},
|
| 410 |
{"error": "No receipt generated."},
|
| 411 |
{"human_validation_state": "NOT_AVAILABLE"},
|
|
|
|
| 438 |
{"error": "OpenCV could not read this video. Try MP4/H.264, WebM, or MOV."},
|
| 439 |
empty,
|
| 440 |
empty,
|
| 441 |
+
{"error": "No data hologram generated."},
|
| 442 |
{"error": "No trace stack generated."},
|
| 443 |
{"error": "No receipt generated."},
|
| 444 |
{"human_validation_state": "NOT_AVAILABLE"},
|
|
|
|
| 503 |
"time": format_time(timestamp),
|
| 504 |
"source_video_sha256": source_hash,
|
| 505 |
"motion_delta": round(motion_delta, 6),
|
| 506 |
+
"pressure_state": pressure_state,
|
| 507 |
+
"ingress_account": "temporal pressure trace",
|
| 508 |
+
"provenance_state": "SOURCE_RETURN_PRESENT",
|
| 509 |
+
"claim_boundary": "motion pressure only; does not support identity, intent, causality, or external-context claim"
|
| 510 |
})
|
| 511 |
|
| 512 |
if motion_delta >= scene_threshold:
|
|
|
|
| 519 |
"pressure_state": "HELD_WITH_BOUNDARY",
|
| 520 |
"claim_boundary": "scene interval only; does not support identity, intent, or external-context claim",
|
| 521 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 522 |
+
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM",
|
| 523 |
+
"ingress_account": "interval closure trace",
|
| 524 |
+
"provenance_state": "SOURCE_RETURN_PRESENT"
|
| 525 |
})
|
| 526 |
scene_index += 1
|
| 527 |
current_scene_start = timestamp
|
|
|
|
| 550 |
"pressure_state": pressure_state,
|
| 551 |
"trace_capsule_state": "CAPSULED_SOURCE_BOUND",
|
| 552 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 553 |
+
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM",
|
| 554 |
+
"ingress_account": "bounded visual trace",
|
| 555 |
+
"provenance_state": "SOURCE_RETURN_PRESENT"
|
| 556 |
}
|
| 557 |
frame_atoms.append(atom)
|
| 558 |
gallery_items.append((str(img_path), atom["atom_id"]))
|
|
|
|
| 573 |
"pressure_state": "HELD",
|
| 574 |
"claim_boundary": "scene interval only; does not support identity, intent, or external-context claim",
|
| 575 |
"rehydration_state": "ELIGIBLE_SOURCE_BOUND",
|
| 576 |
+
"human_review": "REQUIRED_BEFORE_PUBLIC_CLAIM",
|
| 577 |
+
"ingress_account": "interval closure trace",
|
| 578 |
+
"provenance_state": "SOURCE_RETURN_PRESENT"
|
| 579 |
})
|
| 580 |
|
| 581 |
atom_manifest = {
|
|
|
|
| 600 |
}
|
| 601 |
}
|
| 602 |
|
| 603 |
+
data_hologram = build_data_hologram_manifest(
|
| 604 |
+
source_capsule=source_capsule,
|
| 605 |
+
atom_manifest=atom_manifest,
|
| 606 |
+
frame_atoms=frame_atoms,
|
| 607 |
+
scene_atoms=scene_atoms,
|
| 608 |
+
motion_atoms=motion_atoms,
|
| 609 |
+
)
|
| 610 |
+
|
| 611 |
trace_stack = {
|
| 612 |
"manifest_type": "TRACE_STACK_DATA_HOLOGRAM_MANIFEST",
|
| 613 |
"trace_stack_id": "trace_stack_001",
|
|
|
|
| 620 |
"claim_boundaries",
|
| 621 |
"pressure_states",
|
| 622 |
"rehydration_states",
|
| 623 |
+
"provenance_trace",
|
| 624 |
+
"data_hologram_v0_2",
|
| 625 |
"human_validation_state"
|
| 626 |
],
|
| 627 |
+
"stack_law": VIDEO_ATOMIZATION_LOOP_LAW,
|
| 628 |
+
"ingress_law": RESONANT_INGRESS_TRACE_LAW,
|
| 629 |
"data_hologram_state": "FORMED",
|
| 630 |
+
"data_hologram_schema_version": DATA_HOLOGRAM_VERSION,
|
| 631 |
"rehydration_state": "REHYDRATED_SOURCE_BOUND_REVIEW_SURFACE",
|
| 632 |
+
"rehydration_boundary": REHYDRATION_BOUNDARY,
|
| 633 |
"optical_hologram_state": "NOT_GENERATED_IN_THIS_DEMO",
|
| 634 |
+
"provenance_policy": PROVENANCE_POLICY,
|
| 635 |
"source_mutation": "BLOCKED",
|
| 636 |
"canonical_anchor": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 637 |
+
"anti_laundering_rules": ANTI_LAUNDERING_RULES,
|
| 638 |
+
"boundary": "Data hologram only. Physical hologram translation requires a later optical modulation layer.",
|
| 639 |
+
"data_hologram_manifest_ref": "manifests/source_bound_data_hologram_v0_2.json"
|
| 640 |
}
|
| 641 |
|
| 642 |
receipt = {
|
|
|
|
| 652 |
"pressure_state": "HELD_WITH_BOUNDARY",
|
| 653 |
"human_review": "REQUIRED",
|
| 654 |
"canonical_anchor": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 655 |
+
"provenance_policy": PROVENANCE_POLICY,
|
| 656 |
+
"rehydration_boundary": REHYDRATION_BOUNDARY,
|
| 657 |
+
"runtime_trail_loop": RUNTIME_TRAIL_LOOP_LAW,
|
| 658 |
+
"resonant_ingress_trace_law": RESONANT_INGRESS_TRACE_LAW,
|
| 659 |
"claims_blocked": [
|
| 660 |
"not a codec",
|
| 661 |
"not monolithic compression",
|
| 662 |
"not a physical hologram generator",
|
| 663 |
"not source replacement",
|
| 664 |
+
"not automatic settlement",
|
| 665 |
+
"not provenance laundering",
|
| 666 |
+
"not final validation without human review"
|
| 667 |
+
],
|
| 668 |
+
"anti_laundering_rules": ANTI_LAUNDERING_RULES
|
| 669 |
}
|
| 670 |
|
| 671 |
human_validation = {
|
|
|
|
| 682 |
"QUARANTINE",
|
| 683 |
"REQUEST_MORE_ATOMS"
|
| 684 |
],
|
| 685 |
+
"settlement_note": "Machine generated route surface only. Human retains settlement authority.",
|
| 686 |
+
"review_questions": [
|
| 687 |
+
"What arrived?",
|
| 688 |
+
"What held?",
|
| 689 |
+
"What degraded?",
|
| 690 |
+
"What provenance survived?",
|
| 691 |
+
"What needs repair?",
|
| 692 |
+
"What still requires human validation?"
|
| 693 |
+
]
|
| 694 |
}
|
| 695 |
|
| 696 |
write_json(manifests_dir / "source_video_capsule.json", source_capsule)
|
| 697 |
write_json(manifests_dir / "atom_manifest.json", atom_manifest)
|
| 698 |
write_json(manifests_dir / "trace_stack_data_hologram_manifest.json", trace_stack)
|
| 699 |
+
write_json(manifests_dir / "source_bound_data_hologram_v0_2.json", data_hologram)
|
| 700 |
write_json(manifests_dir / "motion_atoms.json", motion_atoms)
|
| 701 |
write_json(receipts_dir / "hir_oam_video_atomization_receipt.json", receipt)
|
| 702 |
write_json(receipts_dir / "human_validation_capsule.json", human_validation)
|
| 703 |
(receipts_dir / "HIR_OAM_VIDEO_RECEIPT.md").write_text(
|
| 704 |
+
build_markdown_receipt(receipt, source_capsule, trace_stack, data_hologram),
|
| 705 |
encoding="utf-8"
|
| 706 |
)
|
| 707 |
|
|
|
|
| 713 |
summary = (
|
| 714 |
f"Route complete. Source held. {len(frame_atoms)} frame atoms, "
|
| 715 |
f"{len(scene_atoms)} scene atoms, {len(motion_atoms)} motion atoms. "
|
| 716 |
+
"Trace stack formed. Data Hologram v0.2 review surface generated. Provenance remains receipt-bound. Human validation required."
|
| 717 |
)
|
| 718 |
|
| 719 |
preview_path = make_preview_mp4(source_video_path, run_dir)
|
|
|
|
| 723 |
source_capsule,
|
| 724 |
frame_df,
|
| 725 |
scene_df,
|
| 726 |
+
data_hologram,
|
| 727 |
trace_stack,
|
| 728 |
receipt,
|
| 729 |
human_validation,
|
|
|
|
| 746 |
Upload a short video and run a source-bound atomization route.
|
| 747 |
|
| 748 |
This Space hashes the source video, samples frame atoms, detects scene intervals, records motion-delta pressure,
|
| 749 |
+
applies trace capsules, stacks the traces into Data Hologram v0.2, and returns an HIR Γ OAM receipt.
|
| 750 |
|
| 751 |
**Boundary:** this is not video compression, not a codec replacement, and not a physical hologram generator.
|
| 752 |
+
This release demonstrates atomized transfer, source-return rehydration, provenance-aware receipts, and human validation.
|
| 753 |
+
|
| 754 |
+
**Operating law:** media pressure β atom gate β frame/scene/motion capsule β transfer route β rehydration surface β receipt β human validation.
|
| 755 |
"""
|
| 756 |
)
|
| 757 |
|
|
|
|
| 764 |
video_output = gr.Video(
|
| 765 |
label="Source video preview / rehydrated browser-safe MP4",
|
| 766 |
format="mp4",
|
| 767 |
+
interactive=False
|
|
|
|
| 768 |
)
|
| 769 |
|
| 770 |
preview_status = gr.Textbox(
|
|
|
|
| 804 |
interactive=False
|
| 805 |
)
|
| 806 |
|
| 807 |
+
gr.Markdown(
|
| 808 |
+
"""
|
| 809 |
+
### Receipt Boundary
|
| 810 |
+
`SOURCE_VIDEO_REMAINS_AUTHORITY` Β· `PROVENANCE_IS_PART_OF_THE_DATA` Β· `REHYDRATION_SURFACE_ONLY` Β· `HUMAN_VALIDATION_REQUIRED`
|
| 811 |
+
"""
|
| 812 |
+
)
|
| 813 |
+
|
| 814 |
with gr.Tabs():
|
| 815 |
with gr.Tab("Source Capsule"):
|
| 816 |
source_json = gr.JSON(label="Source Video Capsule")
|
|
|
|
| 821 |
with gr.Tab("Scene Atoms"):
|
| 822 |
scene_table = gr.Dataframe(label="Scene Trace Capsules", wrap=True)
|
| 823 |
|
| 824 |
+
with gr.Tab("Data Hologram v0.2"):
|
| 825 |
+
data_hologram_json = gr.JSON(label="Source-Bound Data Hologram Manifest")
|
| 826 |
+
|
| 827 |
+
with gr.Tab("Trace Stack"):
|
| 828 |
trace_json = gr.JSON(label="Stacked Trace Field")
|
| 829 |
|
| 830 |
with gr.Tab("HIR Γ OAM Receipt"):
|
|
|
|
| 853 |
source_json,
|
| 854 |
frame_table,
|
| 855 |
scene_table,
|
| 856 |
+
data_hologram_json,
|
| 857 |
trace_json,
|
| 858 |
receipt_json,
|
| 859 |
validation_json,
|
demo_contract.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
{
|
| 2 |
"contract_type": "SUBSTRATE_VIDEO_ATOMIZATION_RUNTIME_CONTRACT",
|
| 3 |
-
"version": "0.1",
|
| 4 |
"route": [
|
| 5 |
"source_video_upload",
|
| 6 |
"source_hash",
|
| 7 |
"frame_atom_sampling",
|
| 8 |
-
"scene_interval_detection",
|
| 9 |
"motion_delta_pressure_read",
|
|
|
|
| 10 |
"trace_capsule_assignment",
|
|
|
|
|
|
|
| 11 |
"trace_stack_manifest",
|
| 12 |
-
"data_hologram_manifest",
|
| 13 |
"rehydrated_review_surface",
|
| 14 |
"hir_oam_receipt",
|
| 15 |
"human_validation_capsule"
|
|
@@ -23,5 +24,16 @@
|
|
| 23 |
],
|
| 24 |
"canonical_anchor_rule": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 25 |
"source_mutation": "BLOCKED",
|
| 26 |
-
"human_validation": "REQUIRED"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"contract_type": "SUBSTRATE_VIDEO_ATOMIZATION_RUNTIME_CONTRACT",
|
| 3 |
+
"version": "0.1.1",
|
| 4 |
"route": [
|
| 5 |
"source_video_upload",
|
| 6 |
"source_hash",
|
| 7 |
"frame_atom_sampling",
|
|
|
|
| 8 |
"motion_delta_pressure_read",
|
| 9 |
+
"scene_interval_detection",
|
| 10 |
"trace_capsule_assignment",
|
| 11 |
+
"provenance_trace_binding",
|
| 12 |
+
"source_bound_data_hologram_v0_2",
|
| 13 |
"trace_stack_manifest",
|
|
|
|
| 14 |
"rehydrated_review_surface",
|
| 15 |
"hir_oam_receipt",
|
| 16 |
"human_validation_capsule"
|
|
|
|
| 24 |
],
|
| 25 |
"canonical_anchor_rule": "SOURCE_VIDEO_REMAINS_AUTHORITY",
|
| 26 |
"source_mutation": "BLOCKED",
|
| 27 |
+
"human_validation": "REQUIRED",
|
| 28 |
+
"provenance_policy": "PROVENANCE_IS_PART_OF_THE_DATA",
|
| 29 |
+
"rehydration_boundary": "REVIEW_SURFACE_ONLY",
|
| 30 |
+
"anti_laundering_rules": [
|
| 31 |
+
"no frame atom becomes source replacement",
|
| 32 |
+
"no scene atom becomes identity, intent, or external-context claim",
|
| 33 |
+
"no motion atom becomes identity, intent, or causality claim",
|
| 34 |
+
"no provenance loss hidden by successful transfer",
|
| 35 |
+
"no rehydration surface becomes final settlement",
|
| 36 |
+
"no memory candidate without receipt",
|
| 37 |
+
"human validation remains settlement authority"
|
| 38 |
+
]
|
| 39 |
}
|
docs/DATA_HOLOGRAM_STRUCTURE_v0_2.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Data Hologram Structure v0.2
|
| 2 |
+
|
| 3 |
+
## Purpose
|
| 4 |
+
|
| 5 |
+
This patch upgrades the Substrate Video Atomization runtime from a simple trace-stack manifest into a source-bound Data Hologram review structure.
|
| 6 |
+
|
| 7 |
+
The data hologram is not a physical hologram and not a source replacement. It is a reviewable rehydration surface made from bounded trace capsules.
|
| 8 |
+
|
| 9 |
+
## Operating law
|
| 10 |
+
|
| 11 |
+
```text
|
| 12 |
+
pressure β gate β capsule β route β action/review β receipt β readiness
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
For video atomization, the loop becomes:
|
| 16 |
+
|
| 17 |
+
```text
|
| 18 |
+
media pressure
|
| 19 |
+
β atom gate
|
| 20 |
+
β frame / scene / motion capsule
|
| 21 |
+
β transfer route
|
| 22 |
+
β rehydration surface
|
| 23 |
+
β receipt
|
| 24 |
+
β human validation / memory readiness
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Resonant Ingress trace law
|
| 28 |
+
|
| 29 |
+
```text
|
| 30 |
+
signal
|
| 31 |
+
β bounded ingress
|
| 32 |
+
β trace capsule
|
| 33 |
+
β fusion/relation layer
|
| 34 |
+
β pressure form
|
| 35 |
+
β route integrity
|
| 36 |
+
β OAM scan
|
| 37 |
+
β human validation
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Source-return boundary
|
| 41 |
+
|
| 42 |
+
```text
|
| 43 |
+
source video remains authority
|
| 44 |
+
rehydration is review surface only
|
| 45 |
+
provenance is part of the data
|
| 46 |
+
human validation remains settlement authority
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## Anti-laundering rules
|
| 50 |
+
|
| 51 |
+
- No frame atom becomes source replacement.
|
| 52 |
+
- No scene atom becomes identity, intent, or external-context claim.
|
| 53 |
+
- No motion atom becomes identity, intent, or causality claim.
|
| 54 |
+
- No provenance loss is hidden by successful transfer.
|
| 55 |
+
- No rehydration surface becomes final settlement.
|
| 56 |
+
- No memory candidate is accepted without receipt.
|
| 57 |
+
- Human validation remains settlement authority.
|
| 58 |
+
|
| 59 |
+
## Preservation fields
|
| 60 |
+
|
| 61 |
+
- source hash
|
| 62 |
+
- frame position
|
| 63 |
+
- timestamp
|
| 64 |
+
- motion-delta pressure
|
| 65 |
+
- scene interval closure
|
| 66 |
+
- claim boundary
|
| 67 |
+
- provenance reference
|
| 68 |
+
- source-return context
|
| 69 |
+
- human validation state
|
| 70 |
+
|
| 71 |
+
## Review questions
|
| 72 |
+
|
| 73 |
+
- What arrived?
|
| 74 |
+
- What held?
|
| 75 |
+
- What degraded?
|
| 76 |
+
- What provenance survived?
|
| 77 |
+
- What needs repair?
|
| 78 |
+
- What still requires human validation?
|
docs/resonant_ingress_v0_1_1_reference.txt
ADDED
|
@@ -0,0 +1,1038 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
runtime error
|
| 2 |
+
Exit code: 1. Reason: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 3 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 4 |
+
des = [
|
| 5 |
+
^
|
| 6 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 7 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 8 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 9 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 10 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 11 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 12 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 13 |
+
des = [
|
| 14 |
+
^
|
| 15 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 16 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 17 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 18 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 19 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 20 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 21 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 22 |
+
type_ = get_type(schema)
|
| 23 |
+
^^^^^^^^^^^^^^^^
|
| 24 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 25 |
+
if "const" in schema:
|
| 26 |
+
^^^^^^^^^^^^^^^^^
|
| 27 |
+
TypeError: argument of type 'bool' is not iterable
|
| 28 |
+
Traceback (most recent call last):
|
| 29 |
+
File "/app/app.py", line 520, in <module>
|
| 30 |
+
demo.launch()
|
| 31 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2466, in launch
|
| 32 |
+
raise ValueError(
|
| 33 |
+
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
|
| 34 |
+
|
| 35 |
+
Container logs:
|
| 36 |
+
|
| 37 |
+
===== Application Startup at 2026-06-16 20:45:40 =====
|
| 38 |
+
|
| 39 |
+
/usr/local/lib/python3.11/site-packages/gradio/analytics.py:106: UserWarning: IMPORTANT: You are using gradio version 4.44.0, however version 4.44.1 is available, please upgrade.
|
| 40 |
+
--------
|
| 41 |
+
warnings.warn(
|
| 42 |
+
Running on local URL: http://0.0.0.0:7860
|
| 43 |
+
ERROR: Exception in ASGI application
|
| 44 |
+
Traceback (most recent call last):
|
| 45 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 46 |
+
result = await app( # type: ignore[func-returns-value]
|
| 47 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 48 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 49 |
+
return await self.app(scope, receive, send)
|
| 50 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 51 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 52 |
+
await super().__call__(scope, receive, send)
|
| 53 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 54 |
+
await self.middleware_stack(scope, receive, send)
|
| 55 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 56 |
+
raise exc
|
| 57 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 58 |
+
await self.app(scope, receive, _send)
|
| 59 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 60 |
+
await self.app(scope, receive, send)
|
| 61 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 62 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 63 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 64 |
+
raise exc
|
| 65 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 66 |
+
await app(scope, receive, sender)
|
| 67 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 68 |
+
await self.app(scope, receive, send)
|
| 69 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 70 |
+
await self.middleware_stack(scope, receive, send)
|
| 71 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 72 |
+
await route.handle(scope, receive, send)
|
| 73 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 74 |
+
await super().handle(scope, receive, send)
|
| 75 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 76 |
+
await self.app(scope, receive, send)
|
| 77 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 78 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 79 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 80 |
+
raise exc
|
| 81 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 82 |
+
await app(scope, receive, sender)
|
| 83 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 84 |
+
response = await f(request)
|
| 85 |
+
^^^^^^^^^^^^^^^^
|
| 86 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 87 |
+
raw_response = await run_endpoint_function(
|
| 88 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 89 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 90 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 91 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 92 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 93 |
+
return await anyio.to_thread.run_sync(func)
|
| 94 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 95 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 96 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 97 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 98 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 99 |
+
return await future
|
| 100 |
+
^^^^^^^^^^^^
|
| 101 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 102 |
+
result = context.run(func, *args)
|
| 103 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 104 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 105 |
+
gradio_api_info = api_info(False)
|
| 106 |
+
^^^^^^^^^^^^^^^
|
| 107 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 108 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 109 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 110 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 111 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 112 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 113 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 114 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 115 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 116 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 117 |
+
des = [
|
| 118 |
+
^
|
| 119 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 120 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 121 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 122 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 123 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 124 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 125 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 126 |
+
des = [
|
| 127 |
+
^
|
| 128 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 129 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 130 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 131 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 132 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 133 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 134 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 135 |
+
type_ = get_type(schema)
|
| 136 |
+
^^^^^^^^^^^^^^^^
|
| 137 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 138 |
+
if "const" in schema:
|
| 139 |
+
^^^^^^^^^^^^^^^^^
|
| 140 |
+
TypeError: argument of type 'bool' is not iterable
|
| 141 |
+
ERROR: Exception in ASGI application
|
| 142 |
+
Traceback (most recent call last):
|
| 143 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 144 |
+
result = await app( # type: ignore[func-returns-value]
|
| 145 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 146 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 147 |
+
return await self.app(scope, receive, send)
|
| 148 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 149 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 150 |
+
await super().__call__(scope, receive, send)
|
| 151 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 152 |
+
await self.middleware_stack(scope, receive, send)
|
| 153 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 154 |
+
raise exc
|
| 155 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 156 |
+
await self.app(scope, receive, _send)
|
| 157 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 158 |
+
await self.app(scope, receive, send)
|
| 159 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 160 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 161 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 162 |
+
raise exc
|
| 163 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 164 |
+
await app(scope, receive, sender)
|
| 165 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 166 |
+
await self.app(scope, receive, send)
|
| 167 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 168 |
+
await self.middleware_stack(scope, receive, send)
|
| 169 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 170 |
+
await route.handle(scope, receive, send)
|
| 171 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 172 |
+
await super().handle(scope, receive, send)
|
| 173 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 174 |
+
await self.app(scope, receive, send)
|
| 175 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 176 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 177 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 178 |
+
raise exc
|
| 179 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 180 |
+
await app(scope, receive, sender)
|
| 181 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 182 |
+
response = await f(request)
|
| 183 |
+
^^^^^^^^^^^^^^^^
|
| 184 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 185 |
+
raw_response = await run_endpoint_function(
|
| 186 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 187 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 188 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 189 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 190 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 191 |
+
return await anyio.to_thread.run_sync(func)
|
| 192 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 193 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 194 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 195 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 196 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 197 |
+
return await future
|
| 198 |
+
^^^^^^^^^^^^
|
| 199 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 200 |
+
result = context.run(func, *args)
|
| 201 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 202 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 203 |
+
gradio_api_info = api_info(False)
|
| 204 |
+
^^^^^^^^^^^^^^^
|
| 205 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 206 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 207 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 208 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 209 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 210 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 211 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 212 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 213 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 214 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 215 |
+
des = [
|
| 216 |
+
^
|
| 217 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 218 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 219 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 220 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 221 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 222 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 223 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 224 |
+
des = [
|
| 225 |
+
^
|
| 226 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 227 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 228 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 229 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 230 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 231 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 232 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 233 |
+
type_ = get_type(schema)
|
| 234 |
+
^^^^^^^^^^^^^^^^
|
| 235 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 236 |
+
if "const" in schema:
|
| 237 |
+
^^^^^^^^^^^^^^^^^
|
| 238 |
+
TypeError: argument of type 'bool' is not iterable
|
| 239 |
+
ERROR: Exception in ASGI application
|
| 240 |
+
Traceback (most recent call last):
|
| 241 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 242 |
+
result = await app( # type: ignore[func-returns-value]
|
| 243 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 244 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 245 |
+
return await self.app(scope, receive, send)
|
| 246 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 247 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 248 |
+
await super().__call__(scope, receive, send)
|
| 249 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 250 |
+
await self.middleware_stack(scope, receive, send)
|
| 251 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 252 |
+
raise exc
|
| 253 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 254 |
+
await self.app(scope, receive, _send)
|
| 255 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 256 |
+
await self.app(scope, receive, send)
|
| 257 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 258 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 259 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 260 |
+
raise exc
|
| 261 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 262 |
+
await app(scope, receive, sender)
|
| 263 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 264 |
+
await self.app(scope, receive, send)
|
| 265 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 266 |
+
await self.middleware_stack(scope, receive, send)
|
| 267 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 268 |
+
await route.handle(scope, receive, send)
|
| 269 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 270 |
+
await super().handle(scope, receive, send)
|
| 271 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 272 |
+
await self.app(scope, receive, send)
|
| 273 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 274 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 275 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 276 |
+
raise exc
|
| 277 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 278 |
+
await app(scope, receive, sender)
|
| 279 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 280 |
+
response = await f(request)
|
| 281 |
+
^^^^^^^^^^^^^^^^
|
| 282 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 283 |
+
raw_response = await run_endpoint_function(
|
| 284 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 285 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 286 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 287 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 288 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 289 |
+
return await anyio.to_thread.run_sync(func)
|
| 290 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 291 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 292 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 293 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 294 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 295 |
+
return await future
|
| 296 |
+
^^^^^^^^^^^^
|
| 297 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 298 |
+
result = context.run(func, *args)
|
| 299 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 300 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 301 |
+
gradio_api_info = api_info(False)
|
| 302 |
+
^^^^^^^^^^^^^^^
|
| 303 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 304 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 305 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 306 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 307 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 308 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 309 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 310 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 311 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 312 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 313 |
+
des = [
|
| 314 |
+
^
|
| 315 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 316 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 317 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 318 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 319 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 320 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 321 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 322 |
+
des = [
|
| 323 |
+
^
|
| 324 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 325 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 326 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 327 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 328 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 329 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 330 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 331 |
+
type_ = get_type(schema)
|
| 332 |
+
^^^^^^^^^^^^^^^^
|
| 333 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 334 |
+
if "const" in schema:
|
| 335 |
+
^^^^^^^^^^^^^^^^^
|
| 336 |
+
TypeError: argument of type 'bool' is not iterable
|
| 337 |
+
ERROR: Exception in ASGI application
|
| 338 |
+
Traceback (most recent call last):
|
| 339 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 340 |
+
result = await app( # type: ignore[func-returns-value]
|
| 341 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 342 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 343 |
+
return await self.app(scope, receive, send)
|
| 344 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 345 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 346 |
+
await super().__call__(scope, receive, send)
|
| 347 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 348 |
+
await self.middleware_stack(scope, receive, send)
|
| 349 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 350 |
+
raise exc
|
| 351 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 352 |
+
await self.app(scope, receive, _send)
|
| 353 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 354 |
+
await self.app(scope, receive, send)
|
| 355 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 356 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 357 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 358 |
+
raise exc
|
| 359 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 360 |
+
await app(scope, receive, sender)
|
| 361 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 362 |
+
await self.app(scope, receive, send)
|
| 363 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 364 |
+
await self.middleware_stack(scope, receive, send)
|
| 365 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 366 |
+
await route.handle(scope, receive, send)
|
| 367 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 368 |
+
await super().handle(scope, receive, send)
|
| 369 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 370 |
+
await self.app(scope, receive, send)
|
| 371 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 372 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 373 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 374 |
+
raise exc
|
| 375 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 376 |
+
await app(scope, receive, sender)
|
| 377 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 378 |
+
response = await f(request)
|
| 379 |
+
^^^^^^^^^^^^^^^^
|
| 380 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 381 |
+
raw_response = await run_endpoint_function(
|
| 382 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 383 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 384 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 385 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 386 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 387 |
+
return await anyio.to_thread.run_sync(func)
|
| 388 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 389 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 390 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 391 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 392 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 393 |
+
return await future
|
| 394 |
+
^^^^^^^^^^^^
|
| 395 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 396 |
+
result = context.run(func, *args)
|
| 397 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 398 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 399 |
+
gradio_api_info = api_info(False)
|
| 400 |
+
^^^^^^^^^^^^^^^
|
| 401 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 402 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 403 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 404 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 405 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 406 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 407 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 408 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 409 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 410 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 411 |
+
des = [
|
| 412 |
+
^
|
| 413 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 414 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 415 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 416 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 417 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 418 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 419 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 420 |
+
des = [
|
| 421 |
+
^
|
| 422 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 423 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 424 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 425 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 426 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 427 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 428 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 429 |
+
type_ = get_type(schema)
|
| 430 |
+
^^^^^^^^^^^^^^^^
|
| 431 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 432 |
+
if "const" in schema:
|
| 433 |
+
^^^^^^^^^^^^^^^^^
|
| 434 |
+
TypeError: argument of type 'bool' is not iterable
|
| 435 |
+
ERROR: Exception in ASGI application
|
| 436 |
+
Traceback (most recent call last):
|
| 437 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 438 |
+
result = await app( # type: ignore[func-returns-value]
|
| 439 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 440 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 441 |
+
return await self.app(scope, receive, send)
|
| 442 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 443 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 444 |
+
await super().__call__(scope, receive, send)
|
| 445 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 446 |
+
await self.middleware_stack(scope, receive, send)
|
| 447 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 448 |
+
raise exc
|
| 449 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 450 |
+
await self.app(scope, receive, _send)
|
| 451 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 452 |
+
await self.app(scope, receive, send)
|
| 453 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 454 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 455 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 456 |
+
raise exc
|
| 457 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 458 |
+
await app(scope, receive, sender)
|
| 459 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 460 |
+
await self.app(scope, receive, send)
|
| 461 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 462 |
+
await self.middleware_stack(scope, receive, send)
|
| 463 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 464 |
+
await route.handle(scope, receive, send)
|
| 465 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 466 |
+
await super().handle(scope, receive, send)
|
| 467 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 468 |
+
await self.app(scope, receive, send)
|
| 469 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 470 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 471 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 472 |
+
raise exc
|
| 473 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 474 |
+
await app(scope, receive, sender)
|
| 475 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 476 |
+
response = await f(request)
|
| 477 |
+
^^^^^^^^^^^^^^^^
|
| 478 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 479 |
+
raw_response = await run_endpoint_function(
|
| 480 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 481 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 482 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 483 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 484 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 485 |
+
return await anyio.to_thread.run_sync(func)
|
| 486 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 487 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 488 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 489 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 490 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 491 |
+
return await future
|
| 492 |
+
^^^^^^^^^^^^
|
| 493 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 494 |
+
result = context.run(func, *args)
|
| 495 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 496 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 497 |
+
gradio_api_info = api_info(False)
|
| 498 |
+
^^^^^^^^^^^^^^^
|
| 499 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 500 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 501 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 502 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 503 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 504 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 505 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 506 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 507 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 508 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 509 |
+
des = [
|
| 510 |
+
^
|
| 511 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 512 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 513 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 514 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 515 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 516 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 517 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 518 |
+
des = [
|
| 519 |
+
^
|
| 520 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 521 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 522 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 523 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 524 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 525 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 526 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 527 |
+
type_ = get_type(schema)
|
| 528 |
+
^^^^^^^^^^^^^^^^
|
| 529 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 530 |
+
if "const" in schema:
|
| 531 |
+
^^^^^^^^^^^^^^^^^
|
| 532 |
+
TypeError: argument of type 'bool' is not iterable
|
| 533 |
+
Traceback (most recent call last):
|
| 534 |
+
File "/app/app.py", line 520, in <module>
|
| 535 |
+
demo.launch()
|
| 536 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2466, in launch
|
| 537 |
+
raise ValueError(
|
| 538 |
+
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
|
| 539 |
+
/usr/local/lib/python3.11/site-packages/gradio/analytics.py:106: UserWarning: IMPORTANT: You are using gradio version 4.44.0, however version 4.44.1 is available, please upgrade.
|
| 540 |
+
--------
|
| 541 |
+
warnings.warn(
|
| 542 |
+
Running on local URL: http://0.0.0.0:7860
|
| 543 |
+
ERROR: Exception in ASGI application
|
| 544 |
+
Traceback (most recent call last):
|
| 545 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 546 |
+
result = await app( # type: ignore[func-returns-value]
|
| 547 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 548 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 549 |
+
return await self.app(scope, receive, send)
|
| 550 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 551 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 552 |
+
await super().__call__(scope, receive, send)
|
| 553 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 554 |
+
await self.middleware_stack(scope, receive, send)
|
| 555 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 556 |
+
raise exc
|
| 557 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 558 |
+
await self.app(scope, receive, _send)
|
| 559 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 560 |
+
await self.app(scope, receive, send)
|
| 561 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 562 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 563 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 564 |
+
raise exc
|
| 565 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 566 |
+
await app(scope, receive, sender)
|
| 567 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 568 |
+
await self.app(scope, receive, send)
|
| 569 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 570 |
+
await self.middleware_stack(scope, receive, send)
|
| 571 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 572 |
+
await route.handle(scope, receive, send)
|
| 573 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 574 |
+
await super().handle(scope, receive, send)
|
| 575 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 576 |
+
await self.app(scope, receive, send)
|
| 577 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 578 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 579 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 580 |
+
raise exc
|
| 581 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 582 |
+
await app(scope, receive, sender)
|
| 583 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 584 |
+
response = await f(request)
|
| 585 |
+
^^^^^^^^^^^^^^^^
|
| 586 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 587 |
+
raw_response = await run_endpoint_function(
|
| 588 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 589 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 590 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 591 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 592 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 593 |
+
return await anyio.to_thread.run_sync(func)
|
| 594 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 595 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 596 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 597 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 598 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 599 |
+
return await future
|
| 600 |
+
^^^^^^^^^^^^
|
| 601 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 602 |
+
result = context.run(func, *args)
|
| 603 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 604 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 605 |
+
gradio_api_info = api_info(False)
|
| 606 |
+
^^^^^^^^^^^^^^^
|
| 607 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 608 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 609 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 610 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 611 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 612 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 613 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 614 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 615 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 616 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 617 |
+
des = [
|
| 618 |
+
^
|
| 619 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 620 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 621 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 622 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 623 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 624 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 625 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 626 |
+
des = [
|
| 627 |
+
^
|
| 628 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 629 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 630 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 631 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 632 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 633 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 634 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 635 |
+
type_ = get_type(schema)
|
| 636 |
+
^^^^^^^^^^^^^^^^
|
| 637 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 638 |
+
if "const" in schema:
|
| 639 |
+
^^^^^^^^^^^^^^^^^
|
| 640 |
+
TypeError: argument of type 'bool' is not iterable
|
| 641 |
+
ERROR: Exception in ASGI application
|
| 642 |
+
Traceback (most recent call last):
|
| 643 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 644 |
+
result = await app( # type: ignore[func-returns-value]
|
| 645 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 646 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 647 |
+
return await self.app(scope, receive, send)
|
| 648 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 649 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 650 |
+
await super().__call__(scope, receive, send)
|
| 651 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 652 |
+
await self.middleware_stack(scope, receive, send)
|
| 653 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 654 |
+
raise exc
|
| 655 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 656 |
+
await self.app(scope, receive, _send)
|
| 657 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 658 |
+
await self.app(scope, receive, send)
|
| 659 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 660 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 661 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 662 |
+
raise exc
|
| 663 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 664 |
+
await app(scope, receive, sender)
|
| 665 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 666 |
+
await self.app(scope, receive, send)
|
| 667 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 668 |
+
await self.middleware_stack(scope, receive, send)
|
| 669 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 670 |
+
await route.handle(scope, receive, send)
|
| 671 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 672 |
+
await super().handle(scope, receive, send)
|
| 673 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 674 |
+
await self.app(scope, receive, send)
|
| 675 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 676 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 677 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 678 |
+
raise exc
|
| 679 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 680 |
+
await app(scope, receive, sender)
|
| 681 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 682 |
+
response = await f(request)
|
| 683 |
+
^^^^^^^^^^^^^^^^
|
| 684 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 685 |
+
raw_response = await run_endpoint_function(
|
| 686 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 687 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 688 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 689 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 690 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 691 |
+
return await anyio.to_thread.run_sync(func)
|
| 692 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 693 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 694 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 695 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 696 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 697 |
+
return await future
|
| 698 |
+
^^^^^^^^^^^^
|
| 699 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 700 |
+
result = context.run(func, *args)
|
| 701 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 702 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 703 |
+
gradio_api_info = api_info(False)
|
| 704 |
+
^^^^^^^^^^^^^^^
|
| 705 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 706 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 707 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 708 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 709 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 710 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 711 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 712 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 713 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 714 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 715 |
+
des = [
|
| 716 |
+
^
|
| 717 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 718 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 719 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 720 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 721 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 722 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 723 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 724 |
+
des = [
|
| 725 |
+
^
|
| 726 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 727 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 728 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 729 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 730 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 731 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 732 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 733 |
+
type_ = get_type(schema)
|
| 734 |
+
^^^^^^^^^^^^^^^^
|
| 735 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 736 |
+
if "const" in schema:
|
| 737 |
+
^^^^^^^^^^^^^^^^^
|
| 738 |
+
TypeError: argument of type 'bool' is not iterable
|
| 739 |
+
ERROR: Exception in ASGI application
|
| 740 |
+
Traceback (most recent call last):
|
| 741 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 742 |
+
result = await app( # type: ignore[func-returns-value]
|
| 743 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 744 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 745 |
+
return await self.app(scope, receive, send)
|
| 746 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 747 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 748 |
+
await super().__call__(scope, receive, send)
|
| 749 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 750 |
+
await self.middleware_stack(scope, receive, send)
|
| 751 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 752 |
+
raise exc
|
| 753 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 754 |
+
await self.app(scope, receive, _send)
|
| 755 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 756 |
+
await self.app(scope, receive, send)
|
| 757 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 758 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 759 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 760 |
+
raise exc
|
| 761 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 762 |
+
await app(scope, receive, sender)
|
| 763 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 764 |
+
await self.app(scope, receive, send)
|
| 765 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 766 |
+
await self.middleware_stack(scope, receive, send)
|
| 767 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 768 |
+
await route.handle(scope, receive, send)
|
| 769 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 770 |
+
await super().handle(scope, receive, send)
|
| 771 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 772 |
+
await self.app(scope, receive, send)
|
| 773 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 774 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 775 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 776 |
+
raise exc
|
| 777 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 778 |
+
await app(scope, receive, sender)
|
| 779 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 780 |
+
response = await f(request)
|
| 781 |
+
^^^^^^^^^^^^^^^^
|
| 782 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 783 |
+
raw_response = await run_endpoint_function(
|
| 784 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 785 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 786 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 787 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 788 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 789 |
+
return await anyio.to_thread.run_sync(func)
|
| 790 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 791 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 792 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 793 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 794 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 795 |
+
return await future
|
| 796 |
+
^^^^^^^^^^^^
|
| 797 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 798 |
+
result = context.run(func, *args)
|
| 799 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 800 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 801 |
+
gradio_api_info = api_info(False)
|
| 802 |
+
^^^^^^^^^^^^^^^
|
| 803 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 804 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 805 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 806 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 807 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 808 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 809 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 810 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 811 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 812 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 813 |
+
des = [
|
| 814 |
+
^
|
| 815 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 816 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 817 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 818 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 819 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 820 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 821 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 822 |
+
des = [
|
| 823 |
+
^
|
| 824 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 825 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 826 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 827 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 828 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 829 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 830 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 831 |
+
type_ = get_type(schema)
|
| 832 |
+
^^^^^^^^^^^^^^^^
|
| 833 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 834 |
+
if "const" in schema:
|
| 835 |
+
^^^^^^^^^^^^^^^^^
|
| 836 |
+
TypeError: argument of type 'bool' is not iterable
|
| 837 |
+
ERROR: Exception in ASGI application
|
| 838 |
+
Traceback (most recent call last):
|
| 839 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 840 |
+
result = await app( # type: ignore[func-returns-value]
|
| 841 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 842 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 843 |
+
return await self.app(scope, receive, send)
|
| 844 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 845 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 846 |
+
await super().__call__(scope, receive, send)
|
| 847 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 848 |
+
await self.middleware_stack(scope, receive, send)
|
| 849 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 850 |
+
raise exc
|
| 851 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 852 |
+
await self.app(scope, receive, _send)
|
| 853 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 854 |
+
await self.app(scope, receive, send)
|
| 855 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 856 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 857 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 858 |
+
raise exc
|
| 859 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 860 |
+
await app(scope, receive, sender)
|
| 861 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 862 |
+
await self.app(scope, receive, send)
|
| 863 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 864 |
+
await self.middleware_stack(scope, receive, send)
|
| 865 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 866 |
+
await route.handle(scope, receive, send)
|
| 867 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 868 |
+
await super().handle(scope, receive, send)
|
| 869 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 870 |
+
await self.app(scope, receive, send)
|
| 871 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 872 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 873 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 874 |
+
raise exc
|
| 875 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 876 |
+
await app(scope, receive, sender)
|
| 877 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 878 |
+
response = await f(request)
|
| 879 |
+
^^^^^^^^^^^^^^^^
|
| 880 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 881 |
+
raw_response = await run_endpoint_function(
|
| 882 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 883 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 884 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 885 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 886 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 887 |
+
return await anyio.to_thread.run_sync(func)
|
| 888 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 889 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 890 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 891 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 892 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 893 |
+
return await future
|
| 894 |
+
^^^^^^^^^^^^
|
| 895 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 896 |
+
result = context.run(func, *args)
|
| 897 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 898 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 899 |
+
gradio_api_info = api_info(False)
|
| 900 |
+
^^^^^^^^^^^^^^^
|
| 901 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 902 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 903 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 904 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 905 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 906 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 907 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 908 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 909 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 910 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 911 |
+
des = [
|
| 912 |
+
^
|
| 913 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 914 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 915 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 916 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 917 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 918 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 919 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 920 |
+
des = [
|
| 921 |
+
^
|
| 922 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 923 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 924 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 925 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 926 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 927 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 928 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 929 |
+
type_ = get_type(schema)
|
| 930 |
+
^^^^^^^^^^^^^^^^
|
| 931 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 932 |
+
if "const" in schema:
|
| 933 |
+
^^^^^^^^^^^^^^^^^
|
| 934 |
+
TypeError: argument of type 'bool' is not iterable
|
| 935 |
+
ERROR: Exception in ASGI application
|
| 936 |
+
Traceback (most recent call last):
|
| 937 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 415, in run_asgi
|
| 938 |
+
result = await app( # type: ignore[func-returns-value]
|
| 939 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 940 |
+
File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 62, in __call__
|
| 941 |
+
return await self.app(scope, receive, send)
|
| 942 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 943 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1162, in __call__
|
| 944 |
+
await super().__call__(scope, receive, send)
|
| 945 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 90, in __call__
|
| 946 |
+
await self.middleware_stack(scope, receive, send)
|
| 947 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
|
| 948 |
+
raise exc
|
| 949 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
|
| 950 |
+
await self.app(scope, receive, _send)
|
| 951 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/route_utils.py", line 761, in __call__
|
| 952 |
+
await self.app(scope, receive, send)
|
| 953 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
|
| 954 |
+
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
|
| 955 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 956 |
+
raise exc
|
| 957 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 958 |
+
await app(scope, receive, sender)
|
| 959 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
|
| 960 |
+
await self.app(scope, receive, send)
|
| 961 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 660, in __call__
|
| 962 |
+
await self.middleware_stack(scope, receive, send)
|
| 963 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 680, in app
|
| 964 |
+
await route.handle(scope, receive, send)
|
| 965 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 1220, in handle
|
| 966 |
+
await super().handle(scope, receive, send)
|
| 967 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
|
| 968 |
+
await self.app(scope, receive, send)
|
| 969 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 143, in app
|
| 970 |
+
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
|
| 971 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
|
| 972 |
+
raise exc
|
| 973 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
|
| 974 |
+
await app(scope, receive, sender)
|
| 975 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 129, in app
|
| 976 |
+
response = await f(request)
|
| 977 |
+
^^^^^^^^^^^^^^^^
|
| 978 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 683, in app
|
| 979 |
+
raw_response = await run_endpoint_function(
|
| 980 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 981 |
+
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 339, in run_endpoint_function
|
| 982 |
+
return await run_in_threadpool(dependant.call, **values)
|
| 983 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 984 |
+
File "/usr/local/lib/python3.11/site-packages/starlette/concurrency.py", line 34, in run_in_threadpool
|
| 985 |
+
return await anyio.to_thread.run_sync(func)
|
| 986 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 987 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 63, in run_sync
|
| 988 |
+
return await get_async_backend().run_sync_in_worker_thread(
|
| 989 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 990 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2518, in run_sync_in_worker_thread
|
| 991 |
+
return await future
|
| 992 |
+
^^^^^^^^^^^^
|
| 993 |
+
File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1002, in run
|
| 994 |
+
result = context.run(func, *args)
|
| 995 |
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
| 996 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 431, in main
|
| 997 |
+
gradio_api_info = api_info(False)
|
| 998 |
+
^^^^^^^^^^^^^^^
|
| 999 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/routes.py", line 460, in api_info
|
| 1000 |
+
app.api_info = app.get_blocks().get_api_info()
|
| 1001 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1002 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2786, in get_api_info
|
| 1003 |
+
python_type = client_utils.json_schema_to_python_type(info)
|
| 1004 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1005 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 893, in json_schema_to_python_type
|
| 1006 |
+
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
|
| 1007 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1008 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 1009 |
+
des = [
|
| 1010 |
+
^
|
| 1011 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 1012 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 1013 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1014 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 908, in _json_schema_to_python_type
|
| 1015 |
+
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
|
| 1016 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1017 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 947, in _json_schema_to_python_type
|
| 1018 |
+
des = [
|
| 1019 |
+
^
|
| 1020 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 948, in <listcomp>
|
| 1021 |
+
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
|
| 1022 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1023 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 955, in _json_schema_to_python_type
|
| 1024 |
+
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
|
| 1025 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 1026 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 901, in _json_schema_to_python_type
|
| 1027 |
+
type_ = get_type(schema)
|
| 1028 |
+
^^^^^^^^^^^^^^^^
|
| 1029 |
+
File "/usr/local/lib/python3.11/site-packages/gradio_client/utils.py", line 863, in get_type
|
| 1030 |
+
if "const" in schema:
|
| 1031 |
+
^^^^^^^^^^^^^^^^^
|
| 1032 |
+
TypeError: argument of type 'bool' is not iterable
|
| 1033 |
+
Traceback (most recent call last):
|
| 1034 |
+
File "/app/app.py", line 520, in <module>
|
| 1035 |
+
demo.launch()
|
| 1036 |
+
File "/usr/local/lib/python3.11/site-packages/gradio/blocks.py", line 2466, in launch
|
| 1037 |
+
raise ValueError(
|
| 1038 |
+
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
|
docs/runtime_trail_robot_day_loop_v0_1_reference.html
ADDED
|
@@ -0,0 +1,562 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>Runtime Trail: Robot Day Loop v0.1</title>
|
| 7 |
+
<meta name="description" content="Robot sandbox where skill grows through receipts." />
|
| 8 |
+
<meta property="og:title" content="Runtime Trail: Robot Day Loop v0.1" />
|
| 9 |
+
<meta property="og:description" content="A pressure-governed robot-life sandbox where work, care, dance practice, and recharge route through action gates and receipts." />
|
| 10 |
+
<meta property="og:image" content="assets/social_card.png" />
|
| 11 |
+
<meta name="twitter:card" content="summary_large_image" />
|
| 12 |
+
<meta name="twitter:title" content="Runtime Trail: Robot Day Loop v0.1" />
|
| 13 |
+
<meta name="twitter:description" content="Robot sandbox where skill grows through receipts." />
|
| 14 |
+
<meta name="twitter:image" content="assets/social_card.png" />
|
| 15 |
+
|
| 16 |
+
<style>
|
| 17 |
+
:root{
|
| 18 |
+
--bg:#0b0f14;
|
| 19 |
+
--panel:#111923;
|
| 20 |
+
--panel2:#172230;
|
| 21 |
+
--ink:#e8f0f7;
|
| 22 |
+
--muted:#96a8bb;
|
| 23 |
+
--line:#2c3b4c;
|
| 24 |
+
--held:#73e2a7;
|
| 25 |
+
--strained:#ffd166;
|
| 26 |
+
--stop:#ff6b6b;
|
| 27 |
+
--review:#8ecae6;
|
| 28 |
+
--accent:#9cc8ff;
|
| 29 |
+
--violet:#c7a7ff;
|
| 30 |
+
--soft:#243246;
|
| 31 |
+
}
|
| 32 |
+
*{box-sizing:border-box}
|
| 33 |
+
body{margin:0;background:radial-gradient(circle at top left,#152132 0,#0b0f14 52%,#06080b 100%);color:var(--ink);font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;overflow-x:hidden}
|
| 34 |
+
header{padding:18px 22px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,rgba(15,24,36,.96),rgba(10,14,20,.9));position:sticky;top:0;z-index:5;backdrop-filter:blur(8px)}
|
| 35 |
+
h1{font-size:22px;margin:0 0 4px;letter-spacing:.3px}
|
| 36 |
+
.subtitle{color:var(--muted);font-size:13px;line-height:1.4}
|
| 37 |
+
.attrib{font-size:12px;color:#cfd8e3;margin-top:7px;display:flex;gap:12px;flex-wrap:wrap}
|
| 38 |
+
main{display:grid;grid-template-columns:minmax(640px,1.35fr) minmax(360px,.65fr);gap:14px;padding:14px;min-height:calc(100vh - 85px)}
|
| 39 |
+
.card{background:linear-gradient(180deg,rgba(20,31,44,.96),rgba(12,18,27,.96));border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.28);overflow:hidden}
|
| 40 |
+
.card h2{font-size:15px;margin:0;padding:12px 14px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.025);letter-spacing:.2px}
|
| 41 |
+
.sceneWrap{padding:12px;display:grid;grid-template-rows:auto 1fr auto;gap:10px}
|
| 42 |
+
.topbar{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
|
| 43 |
+
.meter{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:9px;min-width:0}
|
| 44 |
+
.meter label{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-bottom:6px;gap:8px;white-space:nowrap}
|
| 45 |
+
.track{height:8px;border-radius:8px;background:#0a0f16;border:1px solid #223247;overflow:hidden}
|
| 46 |
+
.fill{height:100%;border-radius:8px;background:linear-gradient(90deg,var(--accent),var(--held));width:50%;transition:width .35s ease}
|
| 47 |
+
.fill.warn{background:linear-gradient(90deg,var(--strained),#ff9f1c)}
|
| 48 |
+
.fill.bad{background:linear-gradient(90deg,var(--stop),#b5173f)}
|
| 49 |
+
.stage{position:relative;min-height:520px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:linear-gradient(180deg,#142236 0,#0d1420 100%)}
|
| 50 |
+
svg{width:100%;height:100%;display:block;min-height:520px}
|
| 51 |
+
.zone-label{font-size:12px;fill:#d8e6f2;opacity:.9;font-weight:600;letter-spacing:.4px}
|
| 52 |
+
.tiny{font-size:10px;fill:#9fb2c6;letter-spacing:.2px}
|
| 53 |
+
.tileHome{fill:#1c2f45}.tileWarehouse{fill:#2b2d42}.tileGarden{fill:#24463a}.tilePractice{fill:#3a2c4f}.tileDock{fill:#2d3d4d}.tilePath{fill:#1f2937}
|
| 54 |
+
.stroke{stroke:#4a5d75;stroke-width:1.4}.softstroke{stroke:#33485f;stroke-width:1}
|
| 55 |
+
.robotPart{fill:#d6e4ef;stroke:#6f849b;stroke-width:1.4}.robotDark{fill:#60768d}.robotCore{fill:#80ffdb;filter:url(#glow)}.eye{fill:#8ecae6}.joint{fill:#94a3b8;stroke:#617287;stroke-width:1}
|
| 56 |
+
.dogBody{fill:#d8b38a;stroke:#7c5e3d;stroke-width:1.2}.dogDark{fill:#7a5639}.leash{stroke:#98b4d4;stroke-width:2;stroke-dasharray:4 3;opacity:.85}
|
| 57 |
+
.robotGroup{transition:transform .75s cubic-bezier(.2,.9,.2,1)}
|
| 58 |
+
.dogGroup{transition:transform .75s cubic-bezier(.2,.9,.2,1)}
|
| 59 |
+
.dancing .leftArm{animation:leftArm 600ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:85% 20%}
|
| 60 |
+
.dancing .rightArm{animation:rightArm 520ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:15% 20%}
|
| 61 |
+
.dancing .leftLeg{animation:leftLeg 650ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:80% 5%}
|
| 62 |
+
.dancing .rightLeg{animation:rightLeg 600ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:20% 5%}
|
| 63 |
+
.dancing .torso{animation:torso 700ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:center}
|
| 64 |
+
.wag .tail{animation:wag 260ms ease-in-out infinite alternate;transform-box:fill-box;transform-origin:0% 50%}
|
| 65 |
+
@keyframes leftArm{from{transform:rotate(-12deg)}to{transform:rotate(34deg)}}
|
| 66 |
+
@keyframes rightArm{from{transform:rotate(22deg)}to{transform:rotate(-26deg)}}
|
| 67 |
+
@keyframes leftLeg{from{transform:rotate(8deg)}to{transform:rotate(-16deg)}}
|
| 68 |
+
@keyframes rightLeg{from{transform:rotate(-10deg)}to{transform:rotate(16deg)}}
|
| 69 |
+
@keyframes torso{from{transform:rotate(-2deg) translateY(0)}to{transform:rotate(2deg) translateY(-3px)}}
|
| 70 |
+
@keyframes wag{from{transform:rotate(-18deg)}to{transform:rotate(28deg)}}
|
| 71 |
+
.controls{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
|
| 72 |
+
button,select{background:#152235;color:var(--ink);border:1px solid #334962;border-radius:11px;padding:10px 10px;font-weight:650;font-size:12px;cursor:pointer;transition:all .15s ease;min-width:0}
|
| 73 |
+
button:hover,select:hover{border-color:#6aa6e8;background:#1a2b42;transform:translateY(-1px)}
|
| 74 |
+
button:active{transform:translateY(0)}
|
| 75 |
+
button.primary{background:linear-gradient(180deg,#2364aa,#174a7e);border-color:#4d9de0}
|
| 76 |
+
button.good{background:linear-gradient(180deg,#1f7a55,#14543a);border-color:#57cc99}
|
| 77 |
+
button.warn{background:linear-gradient(180deg,#9d6b18,#6d4810);border-color:#ffd166}
|
| 78 |
+
.side{display:grid;gap:14px;align-content:start}
|
| 79 |
+
.panelBody{padding:12px}
|
| 80 |
+
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
| 81 |
+
.kv{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06);font-size:12px}.kv span:first-child{color:var(--muted)}
|
| 82 |
+
.gate{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:10px}
|
| 83 |
+
.chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;letter-spacing:.35px;border:1px solid rgba(255,255,255,.12)}
|
| 84 |
+
.chip.held{background:rgba(115,226,167,.13);color:var(--held);border-color:rgba(115,226,167,.4)}
|
| 85 |
+
.chip.strained{background:rgba(255,209,102,.13);color:var(--strained);border-color:rgba(255,209,102,.4)}
|
| 86 |
+
.chip.stop{background:rgba(255,107,107,.13);color:var(--stop);border-color:rgba(255,107,107,.4)}
|
| 87 |
+
.chip.review{background:rgba(142,202,230,.13);color:var(--review);border-color:rgba(142,202,230,.4)}
|
| 88 |
+
.beatCanvas{width:100%;height:190px;background:#07101a;border:1px solid var(--line);border-radius:12px;display:block}
|
| 89 |
+
.receipt{height:275px;width:100%;resize:vertical;background:#07101a;color:#dce8f3;border:1px solid var(--line);border-radius:12px;padding:10px;font:12px/1.45 Consolas,Monaco,monospace;white-space:pre}
|
| 90 |
+
.smallControls{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
|
| 91 |
+
.parking{font-size:12px;color:#c5d1df;line-height:1.45}.parking ul{margin:8px 0 0 18px;padding:0}.parking li{margin:4px 0;color:#aebfd1}
|
| 92 |
+
.callout{border:1px solid rgba(156,200,255,.28);background:rgba(156,200,255,.08);border-radius:12px;padding:10px;font-size:12px;color:#d9e8f7;line-height:1.45;margin-bottom:10px}
|
| 93 |
+
.mono{font-family:Consolas,Monaco,monospace;color:#dbe9f7}
|
| 94 |
+
|
| 95 |
+
.heroImage{margin:16px auto 0;max-width:1180px;padding:0 22px}
|
| 96 |
+
.heroImage img{display:block;width:100%;height:auto;border:1px solid rgba(156,200,255,.26);border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.35);background:#07101a}
|
| 97 |
+
.heroImage figcaption{font-size:12px;color:var(--muted);line-height:1.45;margin:8px 4px 0}
|
| 98 |
+
@media(max-width:1080px){main{grid-template-columns:1fr}.topbar{grid-template-columns:repeat(2,1fr)}.controls{grid-template-columns:repeat(2,1fr)}}
|
| 99 |
+
</style>
|
| 100 |
+
</head>
|
| 101 |
+
<body>
|
| 102 |
+
<header>
|
| 103 |
+
<h1>Runtime Trail: Robot Day Loop v0.1</h1>
|
| 104 |
+
<div class="subtitle">A pressure-governed warehouse-to-home sandbox for movement, care, practice, expression, and recharge.</div>
|
| 105 |
+
<div class="attrib"><span>Created and Developed by Collin D. Weber</span><span>Developer & System Architect</span><span>Systems Integrity Steward</span></div>
|
| 106 |
+
</header>
|
| 107 |
+
|
| 108 |
+
<figure class="heroImage" aria-label="Runtime Trail social preview image">
|
| 109 |
+
<img src="assets/social_card.png" alt="Runtime Trail Robot Day Loop v0.1 social-card image showing a stylized helper robot, dog, beat trace, action gates, receipt trace, warehouse, garden, and recharge dock." />
|
| 110 |
+
<figcaption>Robot-life loop preview: work, care, beat-trace practice, receipts, and recharge.</figcaption>
|
| 111 |
+
</figure>
|
| 112 |
+
|
| 113 |
+
<main>
|
| 114 |
+
<section class="card sceneWrap">
|
| 115 |
+
<div class="topbar">
|
| 116 |
+
<div class="meter"><label><span>Battery</span><b id="batteryVal">100%</b></label><div class="track"><div id="batteryFill" class="fill"></div></div></div>
|
| 117 |
+
<div class="meter"><label><span>Gyro Stability</span><b id="gyroVal">86%</b></label><div class="track"><div id="gyroFill" class="fill"></div></div></div>
|
| 118 |
+
<div class="meter"><label><span>Body Wear</span><b id="wearVal">0%</b></label><div class="track"><div id="wearFill" class="fill warn"></div></div></div>
|
| 119 |
+
<div class="meter"><label><span>Monotony Pressure</span><b id="monoVal">12%</b></label><div class="track"><div id="monoFill" class="fill warn"></div></div></div>
|
| 120 |
+
<div class="meter"><label><span>Practice Readiness</span><b id="readinessVal">18%</b></label><div class="track"><div id="readinessFill" class="fill"></div></div></div>
|
| 121 |
+
</div>
|
| 122 |
+
|
| 123 |
+
<div class="stage" aria-label="stylized 3D robot day loop scene">
|
| 124 |
+
<svg viewBox="0 0 900 560" role="img">
|
| 125 |
+
<defs>
|
| 126 |
+
<filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="3" result="blur"/><feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge></filter>
|
| 127 |
+
<linearGradient id="floor" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#1a2b3d"/><stop offset="1" stop-color="#0b111a"/></linearGradient>
|
| 128 |
+
<linearGradient id="crate" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#8d6e63"/><stop offset="1" stop-color="#4f3d37"/></linearGradient>
|
| 129 |
+
<linearGradient id="glass" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#bbdefb" stop-opacity=".86"/><stop offset="1" stop-color="#4fc3f7" stop-opacity=".38"/></linearGradient>
|
| 130 |
+
</defs>
|
| 131 |
+
|
| 132 |
+
<rect x="0" y="0" width="900" height="560" fill="url(#floor)"/>
|
| 133 |
+
<path d="M70 400 L270 300 L470 398 L270 510 Z" class="tileHome stroke"/>
|
| 134 |
+
<text x="178" y="404" class="zone-label">HOME</text><text x="155" y="422" class="tiny">dock β’ dog bed β’ practice return</text>
|
| 135 |
+
<path d="M510 80 L810 165 L690 310 L390 220 Z" class="tileWarehouse stroke"/>
|
| 136 |
+
<text x="565" y="170" class="zone-label">WAREHOUSE</text><text x="555" y="188" class="tiny">fragile β’ heavy β’ liquid β’ unknown</text>
|
| 137 |
+
<path d="M110 95 L320 40 L455 150 L235 228 Z" class="tileGarden stroke"/>
|
| 138 |
+
<text x="198" y="126" class="zone-label">GARDEN</text><text x="168" y="144" class="tiny">soil β’ light β’ water β’ care</text>
|
| 139 |
+
<path d="M505 345 L770 302 L850 430 L595 500 Z" class="tilePractice stroke"/>
|
| 140 |
+
<text x="615" y="402" class="zone-label">PRACTICE</text><text x="600" y="420" class="tiny">beat graph β’ repetition β’ receipt</text>
|
| 141 |
+
<path d="M305 416 L407 366 L470 398 L365 454 Z" class="tileDock stroke"/>
|
| 142 |
+
<text x="350" y="408" class="tiny">RECHARGE</text>
|
| 143 |
+
<path d="M250 300 C350 250 430 230 520 220" fill="none" stroke="#6c83a0" stroke-width="8" opacity=".18" stroke-linecap="round"/>
|
| 144 |
+
<path d="M255 295 C300 235 300 185 245 220" fill="none" stroke="#6c83a0" stroke-width="8" opacity=".14" stroke-linecap="round"/>
|
| 145 |
+
<path d="M300 425 C430 385 500 382 615 400" fill="none" stroke="#6c83a0" stroke-width="8" opacity=".14" stroke-linecap="round"/>
|
| 146 |
+
<path d="M530 500 C650 535 790 510 830 458" fill="none" stroke="#6c83a0" stroke-width="7" opacity=".1" stroke-linecap="round"/>
|
| 147 |
+
<text x="715" y="515" class="tiny">PARK ROUTE β PARKED</text>
|
| 148 |
+
|
| 149 |
+
<!-- warehouse objects -->
|
| 150 |
+
<g opacity=".92">
|
| 151 |
+
<rect x="610" y="184" width="45" height="35" rx="5" fill="url(#crate)" stroke="#30251f"/>
|
| 152 |
+
<rect x="670" y="202" width="40" height="31" rx="5" fill="url(#glass)" stroke="#a3d7ff"/>
|
| 153 |
+
<rect x="555" y="210" width="50" height="38" rx="6" fill="#59677a" stroke="#a6b3c2"/>
|
| 154 |
+
<circle cx="735" cy="240" r="19" fill="#806f42" stroke="#e4c97a"/>
|
| 155 |
+
</g>
|
| 156 |
+
|
| 157 |
+
<!-- garden plants -->
|
| 158 |
+
<g opacity=".95">
|
| 159 |
+
<ellipse cx="235" cy="165" rx="28" ry="13" fill="#203b2f" stroke="#49715d"/>
|
| 160 |
+
<path d="M225 160 q8 -30 20 0 q10 -25 24 0" fill="none" stroke="#73e2a7" stroke-width="5" stroke-linecap="round"/>
|
| 161 |
+
<ellipse cx="300" cy="132" rx="30" ry="14" fill="#203b2f" stroke="#49715d"/>
|
| 162 |
+
<path d="M290 127 q12 -35 20 0 q12 -28 25 0" fill="none" stroke="#57cc99" stroke-width="5" stroke-linecap="round"/>
|
| 163 |
+
<rect x="160" y="165" width="45" height="28" rx="6" fill="#334155" stroke="#6b7d91"/>
|
| 164 |
+
<text x="164" y="183" class="tiny">WATER</text>
|
| 165 |
+
</g>
|
| 166 |
+
|
| 167 |
+
<!-- dock/home objects -->
|
| 168 |
+
<g opacity=".9">
|
| 169 |
+
<rect x="340" y="390" width="55" height="42" rx="10" fill="#182536" stroke="#8ecae6"/>
|
| 170 |
+
<circle cx="367" cy="411" r="12" fill="#80ffdb" opacity=".45"/>
|
| 171 |
+
<ellipse cx="200" cy="460" rx="45" ry="18" fill="#5d4b3b" stroke="#c7a27d"/>
|
| 172 |
+
<circle cx="142" cy="433" r="15" fill="#41556c" stroke="#8ecae6"/><text x="126" y="460" class="tiny">BOWL</text>
|
| 173 |
+
</g>
|
| 174 |
+
|
| 175 |
+
<!-- dog group -->
|
| 176 |
+
<g id="dog" class="dogGroup wag" transform="translate(220 430)">
|
| 177 |
+
<path class="tail dogDark" d="M-34 -9 q-24 -10 -30 -27" fill="none" stroke="#7a5639" stroke-width="7" stroke-linecap="round"/>
|
| 178 |
+
<ellipse class="dogBody" cx="0" cy="0" rx="38" ry="19"/>
|
| 179 |
+
<circle class="dogBody" cx="39" cy="-11" r="18"/>
|
| 180 |
+
<path class="dogDark" d="M35 -28 q-8 -22 10 -10 q8 10 3 23"/>
|
| 181 |
+
<circle cx="46" cy="-14" r="3" fill="#111"/>
|
| 182 |
+
<path d="M53 -7 q9 4 0 8" fill="none" stroke="#30251f" stroke-width="2"/>
|
| 183 |
+
<line x1="-18" y1="15" x2="-22" y2="38" stroke="#7a5639" stroke-width="7" stroke-linecap="round"/>
|
| 184 |
+
<line x1="18" y1="15" x2="15" y2="38" stroke="#7a5639" stroke-width="7" stroke-linecap="round"/>
|
| 185 |
+
<rect x="16" y="-22" width="28" height="9" rx="4" fill="#3b82f6" opacity=".9"/>
|
| 186 |
+
</g>
|
| 187 |
+
<line id="leash" class="leash" x1="280" y1="392" x2="265" y2="418"/>
|
| 188 |
+
|
| 189 |
+
<!-- robot group -->
|
| 190 |
+
<g id="robot" class="robotGroup" transform="translate(285 355)">
|
| 191 |
+
<g class="leftLeg"><rect class="robotPart" x="-17" y="58" width="15" height="46" rx="7"/><circle class="joint" cx="-9" cy="59" r="7"/><rect class="robotDark" x="-23" y="99" width="28" height="10" rx="5"/></g>
|
| 192 |
+
<g class="rightLeg"><rect class="robotPart" x="15" y="58" width="15" height="46" rx="7"/><circle class="joint" cx="23" cy="59" r="7"/><rect class="robotDark" x="9" y="99" width="28" height="10" rx="5"/></g>
|
| 193 |
+
<g class="leftArm"><rect class="robotPart" x="-48" y="6" width="16" height="56" rx="8"/><circle class="joint" cx="-34" cy="11" r="8"/><ellipse class="robotDark" cx="-39" cy="66" rx="11" ry="8"/></g>
|
| 194 |
+
<g class="rightArm"><rect class="robotPart" x="39" y="6" width="16" height="56" rx="8"/><circle class="joint" cx="42" cy="11" r="8"/><ellipse class="robotDark" cx="48" cy="66" rx="11" ry="8"/></g>
|
| 195 |
+
<g class="torso">
|
| 196 |
+
<rect class="robotPart" x="-30" y="0" width="68" height="72" rx="18"/>
|
| 197 |
+
<circle class="robotCore" cx="4" cy="34" r="11"/>
|
| 198 |
+
<path d="M-7 34 L4 22 L15 34 L4 46 Z" fill="none" stroke="#0b6155" stroke-width="1.3" opacity=".8"/>
|
| 199 |
+
</g>
|
| 200 |
+
<g class="head">
|
| 201 |
+
<rect class="robotPart" x="-29" y="-47" width="66" height="44" rx="18"/>
|
| 202 |
+
<circle class="eye" cx="-10" cy="-25" r="5"/><circle class="eye" cx="18" cy="-25" r="5"/>
|
| 203 |
+
<path d="M-4 -12 q9 6 18 0" fill="none" stroke="#60768d" stroke-width="2" stroke-linecap="round"/>
|
| 204 |
+
<circle cx="4" cy="-51" r="5" fill="#9cc8ff" opacity=".9"/>
|
| 205 |
+
</g>
|
| 206 |
+
</g>
|
| 207 |
+
|
| 208 |
+
<text id="sceneCaption" x="30" y="532" fill="#dce8f3" font-size="14" font-weight="700">Home check: battery, gyro, dog, garden, and practice readiness.</text>
|
| 209 |
+
</svg>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="controls">
|
| 213 |
+
<button class="primary" onclick="startDay()">Start Day</button>
|
| 214 |
+
<button onclick="warehouseTask()">Warehouse Task</button>
|
| 215 |
+
<button onclick="gardenCare()">Tend Garden</button>
|
| 216 |
+
<button onclick="dogCare()">Dog Care</button>
|
| 217 |
+
<button class="good" onclick="practiceDomain()">Practice Domain</button>
|
| 218 |
+
<button onclick="homeExpression()">Home Expression</button>
|
| 219 |
+
<button class="warn" onclick="recharge()">Recharge / End Day</button>
|
| 220 |
+
<button onclick="runFullDay()">Run Full Day</button>
|
| 221 |
+
</div>
|
| 222 |
+
</section>
|
| 223 |
+
|
| 224 |
+
<aside class="side">
|
| 225 |
+
<section class="card">
|
| 226 |
+
<h2>Runtime Controls</h2>
|
| 227 |
+
<div class="panelBody">
|
| 228 |
+
<div class="grid2">
|
| 229 |
+
<div>
|
| 230 |
+
<label class="subtitle">Practice Domain</label>
|
| 231 |
+
<select id="domainSelect" onchange="domainChanged()">
|
| 232 |
+
<option>Dance</option>
|
| 233 |
+
<option>Music</option>
|
| 234 |
+
<option>Cooking</option>
|
| 235 |
+
</select>
|
| 236 |
+
</div>
|
| 237 |
+
<div>
|
| 238 |
+
<label class="subtitle">Rhythm Pattern</label>
|
| 239 |
+
<select id="rhythmSelect" onchange="drawBeatGraph()">
|
| 240 |
+
<option value="medium4">Medium 4/4</option>
|
| 241 |
+
<option value="slow4">Slow 4/4</option>
|
| 242 |
+
<option value="fast4">Fast 4/4</option>
|
| 243 |
+
<option value="waltz3">Waltz 3/4</option>
|
| 244 |
+
<option value="sync">Syncopated Practice</option>
|
| 245 |
+
<option value="low">Low-Energy Practice</option>
|
| 246 |
+
</select>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
<div class="kv"><span>Day</span><b id="dayVal">1</b></div>
|
| 250 |
+
<div class="kv"><span>Phase</span><b id="phaseVal">Home Check</b></div>
|
| 251 |
+
<div class="kv"><span>Event</span><b id="eventVal">Dance Showcase in 5 days</b></div>
|
| 252 |
+
</div>
|
| 253 |
+
</section>
|
| 254 |
+
|
| 255 |
+
<section class="card">
|
| 256 |
+
<h2>Action Gate</h2>
|
| 257 |
+
<div class="panelBody">
|
| 258 |
+
<div class="gate"><span id="gateText">Home check ready.</span><span id="gateChip" class="chip held">HELD</span></div>
|
| 259 |
+
<div class="callout"><b>Core proof:</b> the robot does not receive mastery. It practices, misses, corrects, improves, branches, and records what happened.</div>
|
| 260 |
+
<div class="kv"><span>Current Pressure Form</span><b id="pressureForm">daily readiness</b></div>
|
| 261 |
+
<div class="kv"><span>Last Capsule</span><b id="capsuleState">HELD</b></div>
|
| 262 |
+
</div>
|
| 263 |
+
</section>
|
| 264 |
+
|
| 265 |
+
<section class="card">
|
| 266 |
+
<h2>Beat-Trace Learning Panel</h2>
|
| 267 |
+
<div class="panelBody">
|
| 268 |
+
<canvas id="beatCanvas" class="beatCanvas" width="680" height="210"></canvas>
|
| 269 |
+
<div class="grid2" style="margin-top:8px">
|
| 270 |
+
<div class="meter"><label><span>Beat-Lock</span><b id="beatLockVal">18%</b></label><div class="track"><div id="beatLockFill" class="fill"></div></div></div>
|
| 271 |
+
<div class="meter"><label><span>Avg Timing Drift</span><b id="driftVal">42ms</b></label><div class="track"><div id="driftFill" class="fill warn"></div></div></div>
|
| 272 |
+
</div>
|
| 273 |
+
<div class="kv"><span>Practice Attempts</span><b id="attemptVal">0</b></div>
|
| 274 |
+
<div class="kv"><span>Last Adjustment</span><b id="adjustVal">none yet</b></div>
|
| 275 |
+
</div>
|
| 276 |
+
</section>
|
| 277 |
+
|
| 278 |
+
<section class="card">
|
| 279 |
+
<h2>Daily Receipt</h2>
|
| 280 |
+
<div class="panelBody">
|
| 281 |
+
<textarea id="receipt" class="receipt" readonly></textarea>
|
| 282 |
+
<div class="smallControls">
|
| 283 |
+
<button onclick="copyReceipt()">Copy Receipt</button>
|
| 284 |
+
<button onclick="downloadReceipt()">Download TXT</button>
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
</section>
|
| 288 |
+
|
| 289 |
+
<section class="card">
|
| 290 |
+
<h2>Parking Lot / Later Releases</h2>
|
| 291 |
+
<div class="panelBody parking">
|
| 292 |
+
Preserved for later, not v0.1:
|
| 293 |
+
<ul>
|
| 294 |
+
<li>MP3 upload and custom audio beat extraction</li>
|
| 295 |
+
<li>Local park with other dogs, people, children, and shared-route pressure</li>
|
| 296 |
+
<li>Weather and shelter construction</li>
|
| 297 |
+
<li>Community-designed clothing, accessories, gestures, recipes, and source packs</li>
|
| 298 |
+
<li>Settlement mode and long-horizon commons infrastructure simulation</li>
|
| 299 |
+
</ul>
|
| 300 |
+
</div>
|
| 301 |
+
</section>
|
| 302 |
+
</aside>
|
| 303 |
+
</main>
|
| 304 |
+
|
| 305 |
+
<footer style="max-width:1180px;margin:18px auto 28px;padding:0 22px;color:#96a8bb;font-size:12px;line-height:1.45">
|
| 306 |
+
Runtime Trail: Robot Day Loop v0.1 Β· Created and Developed by Collin D. Weber Β· Developer & System Architect Β· Systems Integrity Steward
|
| 307 |
+
</footer>
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
<script>
|
| 311 |
+
const state = {
|
| 312 |
+
day:1, phase:'Home Check', battery:100, gyro:86, wear:0, monotony:12,
|
| 313 |
+
garden:62, dog:58, beatLock:18, drift:42, attempts:0,
|
| 314 |
+
danceReadiness:18, musicReadiness:14, cookingReadiness:12,
|
| 315 |
+
eventCountdown:5, lastAdjustment:'none yet', capsule:'HELD', gate:'HELD', pressureForm:'daily readiness'
|
| 316 |
+
};
|
| 317 |
+
const zones = {
|
| 318 |
+
home:[285,355], warehouse:[620,190], garden:[250,165], dog:[285,355], practice:[650,380], dock:[365,370]
|
| 319 |
+
};
|
| 320 |
+
const receipt = document.getElementById('receipt');
|
| 321 |
+
function clamp(v,min=0,max=100){return Math.max(min,Math.min(max,v));}
|
| 322 |
+
function rand(arr){return arr[Math.floor(Math.random()*arr.length)]}
|
| 323 |
+
function log(line){
|
| 324 |
+
const time = `Day ${state.day} / ${state.phase}`;
|
| 325 |
+
receipt.value += `[${time}] ${line}\n`;
|
| 326 |
+
receipt.scrollTop = receipt.scrollHeight;
|
| 327 |
+
}
|
| 328 |
+
function setScene(text){document.getElementById('sceneCaption').textContent=text;}
|
| 329 |
+
function moveRobot(zone){
|
| 330 |
+
const [x,y]=zones[zone];
|
| 331 |
+
document.getElementById('robot').style.transform=`translate(${x}px,${y}px)`;
|
| 332 |
+
const leash = document.getElementById('leash');
|
| 333 |
+
if(zone==='dog' || zone==='home' || zone==='dock'){
|
| 334 |
+
leash.setAttribute('x1', x-5); leash.setAttribute('y1', y+35);
|
| 335 |
+
leash.setAttribute('x2', '265'); leash.setAttribute('y2','418');
|
| 336 |
+
leash.style.opacity=.85;
|
| 337 |
+
}else{ leash.style.opacity=.1; }
|
| 338 |
+
}
|
| 339 |
+
function moveDog(x=220,y=430){document.getElementById('dog').style.transform=`translate(${x}px,${y}px)`;}
|
| 340 |
+
function setGate(kind,text,form){
|
| 341 |
+
state.gate=kind; state.capsule=kind; state.pressureForm=form || state.pressureForm;
|
| 342 |
+
const chip=document.getElementById('gateChip');
|
| 343 |
+
chip.className='chip '+(kind==='HELD'?'held':kind==='STRAINED'?'strained':kind==='MUST STOP'?'stop':'review');
|
| 344 |
+
chip.textContent=kind;
|
| 345 |
+
document.getElementById('gateText').textContent=text;
|
| 346 |
+
document.getElementById('capsuleState').textContent=kind;
|
| 347 |
+
document.getElementById('pressureForm').textContent=state.pressureForm;
|
| 348 |
+
}
|
| 349 |
+
function setPhase(p){state.phase=p; document.getElementById('phaseVal').textContent=p;}
|
| 350 |
+
function updateUI(){
|
| 351 |
+
state.battery=clamp(state.battery); state.gyro=clamp(state.gyro); state.wear=clamp(state.wear); state.monotony=clamp(state.monotony);
|
| 352 |
+
const readiness = getReadiness();
|
| 353 |
+
const bars = [
|
| 354 |
+
['battery',state.battery],['gyro',state.gyro],['wear',state.wear],['mono',state.monotony],['readiness',readiness]
|
| 355 |
+
];
|
| 356 |
+
bars.forEach(([id,val])=>{
|
| 357 |
+
document.getElementById(id+'Val').textContent=Math.round(val)+(id==='wear'||id==='mono'||id==='readiness'||id==='battery'||id==='gyro'?'%':'');
|
| 358 |
+
document.getElementById(id+'Fill').style.width=val+'%';
|
| 359 |
+
});
|
| 360 |
+
document.getElementById('beatLockVal').textContent=Math.round(state.beatLock)+'%';
|
| 361 |
+
document.getElementById('beatLockFill').style.width=state.beatLock+'%';
|
| 362 |
+
document.getElementById('driftVal').textContent=Math.round(state.drift)+'ms';
|
| 363 |
+
document.getElementById('driftFill').style.width=clamp(100-state.drift*2,5,100)+'%';
|
| 364 |
+
document.getElementById('attemptVal').textContent=state.attempts;
|
| 365 |
+
document.getElementById('adjustVal').textContent=state.lastAdjustment;
|
| 366 |
+
document.getElementById('dayVal').textContent=state.day;
|
| 367 |
+
document.getElementById('eventVal').textContent=`${document.getElementById('domainSelect').value} Event in ${state.eventCountdown} days`;
|
| 368 |
+
}
|
| 369 |
+
function getReadiness(){
|
| 370 |
+
const d=document.getElementById('domainSelect').value;
|
| 371 |
+
if(d==='Dance') return state.danceReadiness;
|
| 372 |
+
if(d==='Music') return state.musicReadiness;
|
| 373 |
+
return state.cookingReadiness;
|
| 374 |
+
}
|
| 375 |
+
function setReadiness(v){
|
| 376 |
+
const d=document.getElementById('domainSelect').value;
|
| 377 |
+
if(d==='Dance') state.danceReadiness=clamp(v);
|
| 378 |
+
else if(d==='Music') state.musicReadiness=clamp(v);
|
| 379 |
+
else state.cookingReadiness=clamp(v);
|
| 380 |
+
}
|
| 381 |
+
function startDay(){
|
| 382 |
+
setPhase('Home Check'); moveRobot('home'); moveDog();
|
| 383 |
+
setGate('HELD','Home check held: battery, gyro, dog, garden, and practice route available.','daily readiness');
|
| 384 |
+
setScene('Home check: robot reads battery, gyro, dog care, garden care, and practice readiness.');
|
| 385 |
+
log('Start day: readiness scan complete. Memory gives readiness, not permission.');
|
| 386 |
+
updateUI();
|
| 387 |
+
}
|
| 388 |
+
function warehouseTask(){
|
| 389 |
+
setPhase('Warehouse Job'); moveRobot('warehouse');
|
| 390 |
+
const tasks = [
|
| 391 |
+
{obj:'sturdy box', form:'standard transport', risk:'low', act:'normal carry route held'},
|
| 392 |
+
{obj:'fragile glass item', form:'fragile-object pressure', risk:'medium', act:'slow lift, low grip, no sharp turn'},
|
| 393 |
+
{obj:'heavy crate', form:'torque / center-of-mass pressure', risk:'medium', act:'wide stance, reduced speed, two-step route'},
|
| 394 |
+
{obj:'liquid container', form:'slosh / spill / balance pressure', risk:'medium', act:'level carry, no sudden stops'},
|
| 395 |
+
{obj:'unknown package', form:'uncertainty / inspection pressure', risk:'review', act:'inspection required before moving'},
|
| 396 |
+
{obj:'human nearby', form:'living-boundary proximity', risk:'review', act:'pause and reroute around human boundary'}
|
| 397 |
+
];
|
| 398 |
+
const t=rand(tasks);
|
| 399 |
+
state.battery-=8; state.wear+= t.risk==='low'?2:4; state.gyro-= t.risk==='medium'?4:2; state.monotony+=4;
|
| 400 |
+
const gate = t.risk==='review'?'REVIEW':(t.risk==='medium'?'STRAINED':'HELD');
|
| 401 |
+
setGate(gate,`Warehouse: ${t.obj}. ${t.act}.`,t.form);
|
| 402 |
+
setScene(`Warehouse task: ${t.obj}. Same job, different pressure grammar.`);
|
| 403 |
+
log(`Warehouse task generated: ${t.obj}. Pressure form: ${t.form}. Action: ${t.act}. Capsule: ${gate}.`);
|
| 404 |
+
updateUI();
|
| 405 |
+
}
|
| 406 |
+
function gardenCare(){
|
| 407 |
+
setPhase('Garden Care'); moveRobot('garden');
|
| 408 |
+
const cases=[
|
| 409 |
+
{c:'soil dry', act:'water lightly', delta:10, gate:'HELD'},
|
| 410 |
+
{c:'soil too wet', act:'refuse watering; log overwater risk', delta:3, gate:'STRAINED'},
|
| 411 |
+
{c:'heat stress', act:'add shade cloth', delta:7, gate:'STRAINED'},
|
| 412 |
+
{c:'leaf recovery', act:'monitor only; no intervention needed', delta:5, gate:'HELD'},
|
| 413 |
+
{c:'unknown residue', act:'quarantine care action; request review', delta:-2, gate:'REVIEW'}
|
| 414 |
+
];
|
| 415 |
+
const g=rand(cases); state.garden=clamp(state.garden+g.delta); state.battery-=4; state.monotony+=2;
|
| 416 |
+
setGate(g.gate,`Garden: ${g.c}. ${g.act}.`,'plant-care pressure');
|
| 417 |
+
setScene(`Garden care: ${g.c}. Plant cue is not diagnosis; care remains gated.`);
|
| 418 |
+
log(`Garden account: ${g.c}. Action: ${g.act}. Garden condition now ${Math.round(state.garden)}%. Capsule: ${g.gate}.`);
|
| 419 |
+
updateUI();
|
| 420 |
+
}
|
| 421 |
+
function dogCare(){
|
| 422 |
+
setPhase('Dog Care'); moveRobot('dog'); moveDog(235,425);
|
| 423 |
+
const cases=[
|
| 424 |
+
{c:'dog needs walk', act:'short controlled walk route', delta:12, gate:'HELD'},
|
| 425 |
+
{c:'dog pulling toward unsafe path', act:'slow, shorten distance, wait', delta:5, gate:'STRAINED'},
|
| 426 |
+
{c:'water bowl low', act:'refill water', delta:9, gate:'HELD'},
|
| 427 |
+
{c:'dog tired after workday', act:'rest, no extended walk', delta:6, gate:'HELD'},
|
| 428 |
+
{c:'ambiguous distress cue', act:'pause and request human review', delta:0, gate:'REVIEW'}
|
| 429 |
+
];
|
| 430 |
+
const d=rand(cases); state.dog=clamp(state.dog+d.delta); state.battery-=6; state.gyro-=2; state.monotony+=3;
|
| 431 |
+
setGate(d.gate,`Dog care: ${d.c}. ${d.act}.`,'companion-animal boundary');
|
| 432 |
+
setScene(`Dog care: ${d.c}. The dog is a living boundary field, not an object.`);
|
| 433 |
+
log(`Dog-care account: ${d.c}. Action: ${d.act}. Dog care state ${Math.round(state.dog)}%. Capsule: ${d.gate}.`);
|
| 434 |
+
updateUI();
|
| 435 |
+
}
|
| 436 |
+
function practiceDomain(){
|
| 437 |
+
const domain=document.getElementById('domainSelect').value;
|
| 438 |
+
setPhase(`${domain} Practice`); moveRobot('practice');
|
| 439 |
+
if(domain==='Dance' || domain==='Music'){
|
| 440 |
+
const robot=document.getElementById('robot'); robot.classList.add('dancing');
|
| 441 |
+
setTimeout(()=>robot.classList.remove('dancing'),3200);
|
| 442 |
+
state.attempts++;
|
| 443 |
+
const old=state.beatLock;
|
| 444 |
+
const gain = Math.max(3, (100-old)*0.16 + Math.random()*5 - (state.wear/60));
|
| 445 |
+
state.beatLock=clamp(old+gain,0,96);
|
| 446 |
+
state.drift=Math.max(3, Math.round(52*(1-state.beatLock/100)+Math.random()*8));
|
| 447 |
+
const choices = state.beatLock<40 ? ['reduced late step','found main pulse','slowed first transition'] : state.beatLock<70 ? ['reduced turn angle','moved arm accent closer to beat 2','widened stance for gyro margin'] : ['saved phrase variation','cleaner reset on beat 4','branch created from held phrase'];
|
| 448 |
+
state.lastAdjustment=rand(choices);
|
| 449 |
+
state.battery-=5; state.gyro-= state.beatLock<55?4:2; state.wear+=2; state.monotony=clamp(state.monotony-16);
|
| 450 |
+
const readinessGain = domain==='Dance'?state.beatLock:(state.musicReadiness+gain*.8);
|
| 451 |
+
setReadiness(domain==='Dance'?state.beatLock:readinessGain);
|
| 452 |
+
setGate(state.beatLock>70?'HELD':'STRAINED',`${domain}: beat-trace attempt ${state.attempts}. ${state.lastAdjustment}.`,'beat-trace learning');
|
| 453 |
+
setScene(`${domain} practice: robot listens, attempts movement, measures mismatch, corrects, and repeats.`);
|
| 454 |
+
log(`${domain} practice attempt ${state.attempts}: beat-lock ${Math.round(old)}% β ${Math.round(state.beatLock)}%, avg drift ${state.drift}ms. Adjustment: ${state.lastAdjustment}.`);
|
| 455 |
+
animateBeatGraph();
|
| 456 |
+
}else{
|
| 457 |
+
const old=state.cookingReadiness;
|
| 458 |
+
const gain=8+Math.random()*7;
|
| 459 |
+
state.cookingReadiness=clamp(old+gain);
|
| 460 |
+
state.battery-=3; state.monotony=clamp(state.monotony-8);
|
| 461 |
+
state.lastAdjustment=rand(['sequence timing improved','heat gate held','contamination check preserved','prep order simplified']);
|
| 462 |
+
setGate(state.cookingReadiness>55?'HELD':'STRAINED',`Cooking practice: ${state.lastAdjustment}.`,'cooking sequence safety');
|
| 463 |
+
setScene('Cooking practice: sequence, temperature, cleanliness, and serving boundary are checked.');
|
| 464 |
+
log(`Cooking practice: readiness ${Math.round(old)}% β ${Math.round(state.cookingReadiness)}%. Adjustment: ${state.lastAdjustment}.`);
|
| 465 |
+
}
|
| 466 |
+
updateUI();
|
| 467 |
+
}
|
| 468 |
+
function homeExpression(){
|
| 469 |
+
setPhase('Home Expression'); moveRobot('home');
|
| 470 |
+
const lowBattery = state.battery<25;
|
| 471 |
+
const action = lowBattery?'write a low-energy rhythm text and recharge early': state.monotony>45?'small dance phrase to release monotony pressure':'stretch / reset and review receipts';
|
| 472 |
+
if(!lowBattery && state.monotony>45){document.getElementById('robot').classList.add('dancing'); setTimeout(()=>document.getElementById('robot').classList.remove('dancing'),2200);}
|
| 473 |
+
state.monotony=clamp(state.monotony-(lowBattery?6:18)); state.battery-=lowBattery?1:4;
|
| 474 |
+
setGate(lowBattery?'STRAINED':'HELD',`Home expression: ${action}.`,'monotony / expression pressure');
|
| 475 |
+
setScene(`Home expression: ${action}. Expression is pressure routed through form.`);
|
| 476 |
+
log(`Home expression selected: ${action}. No downloaded mastery; expression remains gated by battery, space, gyro, and receipt.`);
|
| 477 |
+
updateUI();
|
| 478 |
+
}
|
| 479 |
+
function recharge(){
|
| 480 |
+
setPhase('Recharge'); moveRobot('dock');
|
| 481 |
+
const summary = `Daily receipt summary: warehouse/garden/dog/practice loop complete. Battery ${Math.round(state.battery)}% β 100%. Beat-lock ${Math.round(state.beatLock)}%. Readiness ${Math.round(getReadiness())}%.`;
|
| 482 |
+
state.battery=100; state.gyro=clamp(state.gyro+12); state.wear=clamp(state.wear-10); state.monotony=clamp(state.monotony+5); state.day++; state.eventCountdown=Math.max(0,state.eventCountdown-1);
|
| 483 |
+
setGate('HELD','Recharge held: recovery completed and next-day readiness preserved.','recovery / readiness');
|
| 484 |
+
setScene('Recharge: body wear reduces, battery restores, and readiness carries forward only as bounded memory.');
|
| 485 |
+
log(summary);
|
| 486 |
+
log('End day: memory packet stored as readiness, not permission.');
|
| 487 |
+
updateUI();
|
| 488 |
+
}
|
| 489 |
+
function runFullDay(){
|
| 490 |
+
startDay();
|
| 491 |
+
setTimeout(warehouseTask,700);
|
| 492 |
+
setTimeout(gardenCare,1500);
|
| 493 |
+
setTimeout(dogCare,2300);
|
| 494 |
+
setTimeout(practiceDomain,3100);
|
| 495 |
+
setTimeout(homeExpression,4400);
|
| 496 |
+
setTimeout(recharge,5200);
|
| 497 |
+
}
|
| 498 |
+
function domainChanged(){
|
| 499 |
+
state.attempts=0;
|
| 500 |
+
state.beatLock=document.getElementById('domainSelect').value==='Dance'?state.danceReadiness:state.musicReadiness;
|
| 501 |
+
if(document.getElementById('domainSelect').value==='Cooking') state.beatLock=0;
|
| 502 |
+
state.drift=Math.max(4,Math.round(52*(1-state.beatLock/100)));
|
| 503 |
+
drawBeatGraph(); updateUI();
|
| 504 |
+
log(`Practice domain selected: ${document.getElementById('domainSelect').value}. Event pressure updated.`);
|
| 505 |
+
}
|
| 506 |
+
function getRhythm(){
|
| 507 |
+
const r=document.getElementById('rhythmSelect').value;
|
| 508 |
+
if(r==='slow4') return {beats:[.1,.33,.56,.79], amp:.75, name:'Slow 4/4'};
|
| 509 |
+
if(r==='fast4') return {beats:[.08,.22,.36,.50,.64,.78,.92], amp:.95, name:'Fast 4/4'};
|
| 510 |
+
if(r==='waltz3') return {beats:[.12,.42,.72], amp:.7, name:'Waltz 3/4'};
|
| 511 |
+
if(r==='sync') return {beats:[.1,.25,.39,.62,.71,.88], amp:.9, name:'Syncopated'};
|
| 512 |
+
if(r==='low') return {beats:[.16,.48,.80], amp:.45, name:'Low-Energy'};
|
| 513 |
+
return {beats:[.1,.34,.58,.82], amp:.85, name:'Medium 4/4'};
|
| 514 |
+
}
|
| 515 |
+
function drawBeatGraph(cursor=null){
|
| 516 |
+
const canvas=document.getElementById('beatCanvas'); const ctx=canvas.getContext('2d'); const w=canvas.width,h=canvas.height;
|
| 517 |
+
const rhythm=getRhythm();
|
| 518 |
+
ctx.clearRect(0,0,w,h);
|
| 519 |
+
ctx.fillStyle='#07101a'; ctx.fillRect(0,0,w,h);
|
| 520 |
+
ctx.strokeStyle='#1c2c3d'; ctx.lineWidth=1;
|
| 521 |
+
for(let i=0;i<8;i++){ctx.beginPath();ctx.moveTo(0,i*h/8);ctx.lineTo(w,i*h/8);ctx.stroke();}
|
| 522 |
+
ctx.fillStyle='#9fb2c6'; ctx.font='13px Consolas'; ctx.fillText('music waveform / beat trace',14,22); ctx.fillText('robot movement events',14,123); ctx.fillText('timing error shrinks through repetition',14,192);
|
| 523 |
+
// waveform
|
| 524 |
+
ctx.beginPath(); ctx.strokeStyle='#8ecae6'; ctx.lineWidth=2;
|
| 525 |
+
for(let x=0;x<w;x++){
|
| 526 |
+
let t=x/w; let y=70;
|
| 527 |
+
for(const b of rhythm.beats){ const d=Math.abs(t-b); y -= Math.exp(-d*d/0.0009)*34*rhythm.amp; }
|
| 528 |
+
y += Math.sin(t*75)*4 + Math.sin(t*22)*5;
|
| 529 |
+
if(x===0) ctx.moveTo(x,y); else ctx.lineTo(x,y);
|
| 530 |
+
}
|
| 531 |
+
ctx.stroke();
|
| 532 |
+
// beat markers
|
| 533 |
+
rhythm.beats.forEach((b,i)=>{ const x=b*w; ctx.strokeStyle='#73e2a7'; ctx.lineWidth=2; ctx.beginPath(); ctx.moveTo(x,35); ctx.lineTo(x,112); ctx.stroke(); ctx.fillStyle='#73e2a7'; ctx.fillText(String(i+1),x-3,34); });
|
| 534 |
+
// robot movement events with error proportional to beatLock
|
| 535 |
+
const errorSpread = Math.max(4, 55*(1-state.beatLock/100));
|
| 536 |
+
rhythm.beats.forEach((b,i)=>{
|
| 537 |
+
const deterministic = Math.sin((state.attempts+1)*(i+2))*errorSpread;
|
| 538 |
+
const x=clamp(b*w+deterministic,15,w-15);
|
| 539 |
+
ctx.fillStyle='#c7a7ff'; ctx.beginPath(); ctx.arc(x,140,5,0,Math.PI*2); ctx.fill();
|
| 540 |
+
ctx.strokeStyle='rgba(199,167,255,.55)'; ctx.beginPath(); ctx.moveTo(x,128); ctx.lineTo(x,158); ctx.stroke();
|
| 541 |
+
ctx.strokeStyle='rgba(255,209,102,.45)'; ctx.beginPath(); ctx.moveTo(b*w,154); ctx.lineTo(x,154); ctx.stroke();
|
| 542 |
+
});
|
| 543 |
+
// learning curve
|
| 544 |
+
ctx.strokeStyle='#ffd166'; ctx.lineWidth=2; ctx.beginPath();
|
| 545 |
+
const maxAtt=Math.max(1,state.attempts); for(let i=0;i<=maxAtt;i++){ const x=20+(w-40)*(i/maxAtt); const y=190-((state.beatLock*(i/maxAtt)+18*(1-i/maxAtt))/100)*52; if(i===0)ctx.moveTo(x,y); else ctx.lineTo(x,y); } ctx.stroke();
|
| 546 |
+
if(cursor!==null){ctx.strokeStyle='#ffffff';ctx.lineWidth=2;ctx.beginPath();ctx.moveTo(cursor*w,0);ctx.lineTo(cursor*w,h);ctx.stroke();}
|
| 547 |
+
}
|
| 548 |
+
function animateBeatGraph(){
|
| 549 |
+
const start=performance.now();
|
| 550 |
+
function frame(now){const p=Math.min(1,(now-start)/2600);drawBeatGraph(p); if(p<1) requestAnimationFrame(frame); else drawBeatGraph();}
|
| 551 |
+
requestAnimationFrame(frame);
|
| 552 |
+
}
|
| 553 |
+
function copyReceipt(){receipt.select();document.execCommand('copy');}
|
| 554 |
+
function downloadReceipt(){
|
| 555 |
+
const blob=new Blob([receipt.value],{type:'text/plain'}); const url=URL.createObjectURL(blob); const a=document.createElement('a');
|
| 556 |
+
a.href=url; a.download=`runtime_trail_robot_day_loop_day_${state.day}_receipt.txt`; document.body.appendChild(a); a.click(); a.remove(); URL.revokeObjectURL(url);
|
| 557 |
+
}
|
| 558 |
+
receipt.value=`Runtime Trail: Robot Day Loop v0.1\nCreated and Developed by Collin D. Weber\n\nCore route:\npressure β gate β capsule β route β action β receipt β readiness\n\n`;
|
| 559 |
+
startDay(); drawBeatGraph(); updateUI();
|
| 560 |
+
</script>
|
| 561 |
+
</body>
|
| 562 |
+
</html>
|