syntaxmatrix 2.3.5__py3-none-any.whl → 2.5.5.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- syntaxmatrix/agentic/__init__.py +0 -0
- syntaxmatrix/agentic/agent_tools.py +24 -0
- syntaxmatrix/agentic/agents.py +810 -0
- syntaxmatrix/agentic/code_tools_registry.py +37 -0
- syntaxmatrix/agentic/model_templates.py +1790 -0
- syntaxmatrix/commentary.py +134 -112
- syntaxmatrix/core.py +385 -245
- syntaxmatrix/dataset_preprocessing.py +218 -0
- syntaxmatrix/display.py +89 -37
- syntaxmatrix/gpt_models_latest.py +5 -4
- syntaxmatrix/profiles.py +19 -4
- syntaxmatrix/routes.py +947 -141
- syntaxmatrix/settings/model_map.py +38 -30
- syntaxmatrix/static/icons/hero_bg.jpg +0 -0
- syntaxmatrix/templates/dashboard.html +248 -54
- syntaxmatrix/utils.py +2254 -84
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.4.dist-info}/METADATA +16 -17
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.4.dist-info}/RECORD +21 -15
- syntaxmatrix/model_templates.py +0 -29
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.4.dist-info}/WHEEL +0 -0
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.4.dist-info}/licenses/LICENSE.txt +0 -0
- {syntaxmatrix-2.3.5.dist-info → syntaxmatrix-2.5.5.4.dist-info}/top_level.txt +0 -0
|
@@ -4,32 +4,36 @@ import os
|
|
|
4
4
|
|
|
5
5
|
PROVIDERS_MODELS = {
|
|
6
6
|
#1
|
|
7
|
-
"openai": [
|
|
7
|
+
"openai": [
|
|
8
|
+
"gpt-5.1",
|
|
9
|
+
"gpt-5.1-chat-latest",
|
|
10
|
+
"gpt-5.1-codex-mini",
|
|
11
|
+
"gpt-5.1-codex",
|
|
12
|
+
"gpt-5",
|
|
13
|
+
"gpt-5-nano",
|
|
14
|
+
"gpt-5-mini",
|
|
15
|
+
"gpt-4.1",
|
|
16
|
+
"gpt-4.1-nano",
|
|
17
|
+
"gpt-4.1-mini",
|
|
8
18
|
"gpt-4o-mini",
|
|
9
19
|
"gpt-4o",
|
|
10
|
-
"gpt-4.1-nano",
|
|
11
|
-
"gpt-4.1-mini",
|
|
12
|
-
"gpt-4.1",
|
|
13
|
-
"gpt-5-chat-latest",
|
|
14
|
-
"gpt-5-nano",
|
|
15
|
-
"gpt-5-mini",
|
|
16
|
-
"gpt-5",
|
|
17
20
|
],
|
|
18
21
|
#2
|
|
19
|
-
"google": [
|
|
20
|
-
"
|
|
21
|
-
"gemini-2.0-flash-lite",
|
|
22
|
-
"gemini-2.0-flash",
|
|
22
|
+
"google": [
|
|
23
|
+
"gemini-3-pro-preview",
|
|
23
24
|
"gemini-2.5-flash-lite",
|
|
24
25
|
"gemini-2.5-flash",
|
|
25
26
|
"gemini-2.5-pro",
|
|
27
|
+
"gemini-2.0-flash-lite",
|
|
28
|
+
"gemini-2.0-flash",
|
|
26
29
|
],
|
|
27
30
|
#3
|
|
28
|
-
"xai": [
|
|
31
|
+
"xai": [
|
|
32
|
+
"grok-4",
|
|
29
33
|
"grok-3-mini-fast",
|
|
30
34
|
"grok-3-mini",
|
|
31
35
|
"grok-3",
|
|
32
|
-
|
|
36
|
+
|
|
33
37
|
],
|
|
34
38
|
#4
|
|
35
39
|
"deepseek": [
|
|
@@ -48,7 +52,9 @@ PROVIDERS_MODELS = {
|
|
|
48
52
|
],
|
|
49
53
|
#7
|
|
50
54
|
"anthropic": [
|
|
55
|
+
"claude-opus-4-5",
|
|
51
56
|
"claude-opus-4-1",
|
|
57
|
+
"claude-sonnet-4-5",
|
|
52
58
|
"claude-sonnet-4-0",
|
|
53
59
|
"claude-3-5-haiku-latest",
|
|
54
60
|
"claude-3-haiku-20240307",
|
|
@@ -114,12 +120,12 @@ MODEL_DESCRIPTIONS = {
|
|
|
114
120
|
# "gpt-o4-mini-high":"Enhanced mini-engine; $2.50/1M in (est.), $10.00/1M out (est.). Suited for interactive assistants with visual reasoning.",
|
|
115
121
|
|
|
116
122
|
# Google
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
"gemma-3n-e4b-it":"""Gemma is free.
|
|
124
|
+
Best for: Use case:
|
|
125
|
+
- Low latency | - Visual and text processing
|
|
126
|
+
- Multilingual | - Text translation
|
|
127
|
+
- Summarization | - Summarizing text research content
|
|
128
|
+
""",
|
|
123
129
|
|
|
124
130
|
#2 Google
|
|
125
131
|
"gemma-3n-e4b-it": """
|
|
@@ -140,12 +146,11 @@ MODEL_DESCRIPTIONS = {
|
|
|
140
146
|
- Native tool use | - Stream images & vids in R time
|
|
141
147
|
""",
|
|
142
148
|
|
|
143
|
-
"gemini-2.5-flash-lite": "
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
""",
|
|
149
|
+
"gemini-2.5-flash-lite": "($0.10 In, $0.40 Out)/1M (est.) CoD: Jan 2025."
|
|
150
|
+
" Best for: Use case:"
|
|
151
|
+
" - Large scale processing - Data transformation"
|
|
152
|
+
" - Low latency, high volume - Translation"
|
|
153
|
+
" tasks with thinking - Summarizationt",
|
|
149
154
|
|
|
150
155
|
"gemini-2.5-flash": """$0.30. $2.50 Out CoD: Jan 2024.
|
|
151
156
|
Best for: Use case:
|
|
@@ -293,13 +298,16 @@ EMBEDDING_MODELS = {
|
|
|
293
298
|
"openai": [
|
|
294
299
|
"text-embedding-3-small",
|
|
295
300
|
"text-embedding-3-large",
|
|
296
|
-
]
|
|
301
|
+
],
|
|
297
302
|
}
|
|
298
303
|
|
|
299
304
|
|
|
300
305
|
GPT_MODELS_LATEST = [
|
|
301
|
-
"gpt-5
|
|
302
|
-
"gpt-5-
|
|
303
|
-
"gpt-5-mini",
|
|
306
|
+
"gpt-5.1",
|
|
307
|
+
"gpt-5.1-chat-latest",
|
|
308
|
+
"gpt-5.1-codex-mini",
|
|
309
|
+
"gpt-5.1-codex",
|
|
304
310
|
"gpt-5",
|
|
311
|
+
"gpt-5-nano",
|
|
312
|
+
"gpt-5-mini",
|
|
305
313
|
]
|
|
Binary file
|
|
@@ -417,6 +417,179 @@
|
|
|
417
417
|
}
|
|
418
418
|
.code-copy-btn:hover{ background:#0b5ed7; }
|
|
419
419
|
</style>
|
|
420
|
+
<style>
|
|
421
|
+
.eda-grid{
|
|
422
|
+
display:grid;
|
|
423
|
+
grid-template-columns:repeat(auto-fit, minmax(360px,1fr));
|
|
424
|
+
gap:12px;
|
|
425
|
+
align-items:start;
|
|
426
|
+
}
|
|
427
|
+
.eda-card{
|
|
428
|
+
background:#fff;
|
|
429
|
+
border:1px solid #e5e7eb;
|
|
430
|
+
border-radius:12px;
|
|
431
|
+
padding:14px 16px;
|
|
432
|
+
box-shadow:0 1px 8px rgba(0,0,0,.04);
|
|
433
|
+
opacity:0; transform:translateY(6px);
|
|
434
|
+
animation:edaFade .35s ease forwards;
|
|
435
|
+
animation-delay: calc(var(--i, 0) * 60ms);
|
|
436
|
+
}
|
|
437
|
+
/* 12-column grid */
|
|
438
|
+
.eda-grid.eda-grid-12{
|
|
439
|
+
display:grid;
|
|
440
|
+
grid-auto-flow:dense;
|
|
441
|
+
grid-template-columns:repeat(12, minmax(0,1fr));
|
|
442
|
+
gap:12px; align-items:start;
|
|
443
|
+
}
|
|
444
|
+
/* Helpers (use these in cell["span"]) */
|
|
445
|
+
.eda-col-3 { grid-column:span 3; } /* third width → 3:3:3:3 */
|
|
446
|
+
.eda-col-4 { grid-column:span 4; } /* third width → 4:4:4 */
|
|
447
|
+
.eda-col-5 { grid-column:span 5; } /* third width → 5:7 */
|
|
448
|
+
.eda-col-6 { grid-column:span 6; } /* half width → 6:6 */
|
|
449
|
+
.eda-col-7 { grid-column:span 7; } /* third width → 7:5 */
|
|
450
|
+
.eda-col-8 { grid-column:span 8; } /* two-thirds → 8:4 */
|
|
451
|
+
.eda-col-9 { grid-column:span 9; } /* two-thirds → 9:3 */
|
|
452
|
+
.eda-col-12 { grid-column:span 12;} /* full width */
|
|
453
|
+
|
|
454
|
+
/* Breakpoints */
|
|
455
|
+
@media (max-width:960px){
|
|
456
|
+
.eda-grid.eda-grid-12{ grid-template-columns:repeat(6, minmax(0,1fr)); }
|
|
457
|
+
.eda-col-9{ grid-column:span 6; }
|
|
458
|
+
.eda-col-8{ grid-column:span 6; }
|
|
459
|
+
.eda-col-7{ grid-column:span 6; }
|
|
460
|
+
.eda-col-6{ grid-column:span 6; }
|
|
461
|
+
.eda-col-5{ grid-column:span 6; }
|
|
462
|
+
.eda-col-4{ grid-column:span 6; }
|
|
463
|
+
.eda-col-3{ grid-column:span 6; }
|
|
464
|
+
}
|
|
465
|
+
@media (max-width:540px){
|
|
466
|
+
.eda-grid.eda-grid-12{ grid-template-columns:repeat(1, 1fr); }
|
|
467
|
+
.eda-card, .eda-col-3, .eda-col-4, .eda-col-5, .eda-col-6, .eda-col-7, .eda-col-8, .eda-col-9, .eda-col-12 {
|
|
468
|
+
grid-column:span 12;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
.eda-card h3{ margin:0 0 .5rem; font-size:1.02rem; }
|
|
472
|
+
.eda-card .eda-body{ overflow:auto; }
|
|
473
|
+
.eda-card details summary{ cursor:pointer; color:#0366d6; margin-top:.5rem; }
|
|
474
|
+
@keyframes edaFade{ to { opacity:1; transform:none; } }
|
|
475
|
+
|
|
476
|
+
</style>
|
|
477
|
+
<style id="smx-theme">
|
|
478
|
+
:root{
|
|
479
|
+
--smx-bg: #f3f6fb;
|
|
480
|
+
--smx-surface: #ffffff;
|
|
481
|
+
--smx-elev1: #fcfdff;
|
|
482
|
+
--smx-border: #dfe5ee;
|
|
483
|
+
--smx-text: #0f172a;
|
|
484
|
+
--smx-muted: #667085;
|
|
485
|
+
--smx-accent: #007acc; /* SyntaxMatrix blue (keeps your current tone) */
|
|
486
|
+
--smx-accent-2: #14b8a6; /* teal for subtle gradients */
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
body.smx-theme{
|
|
490
|
+
background: linear-gradient(180deg, var(--smx-bg) 0%, #eef3f9 60%, #eaf0f7 100%);
|
|
491
|
+
color: var(--smx-text);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/* Sidebar + tabs pick up accent */
|
|
495
|
+
.dashboard-sidebar{
|
|
496
|
+
background: linear-gradient(180deg, #f0f5fb 0%, #eaf1f8 100%);
|
|
497
|
+
border-right: 1px solid var(--smx-border);
|
|
498
|
+
}
|
|
499
|
+
.dashboard-sidebar h2{ color: var(--smx-accent); }
|
|
500
|
+
.dashboard-tabs a{ background:#e9f2fb; border-color: var(--smx-border); color:#1f2a37; }
|
|
501
|
+
.dashboard-tabs .active a, .dashboard-tabs a.active{
|
|
502
|
+
background: var(--smx-surface);
|
|
503
|
+
color: var(--smx-accent);
|
|
504
|
+
border-color: var(--smx-border);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/* Cards: clearer elevation + accent top bar */
|
|
508
|
+
.eda-card{
|
|
509
|
+
background: var(--smx-surface);
|
|
510
|
+
border: 1px solid var(--smx-border);
|
|
511
|
+
border-radius: 14px;
|
|
512
|
+
box-shadow: 0 6px 18px rgba(16,24,40,.06);
|
|
513
|
+
position: relative;
|
|
514
|
+
}
|
|
515
|
+
.eda-card::before{
|
|
516
|
+
content:"";
|
|
517
|
+
position:absolute; inset:0 0 auto 0; height:4px; border-radius:14px 14px 0 0;
|
|
518
|
+
background: linear-gradient(90deg, var(--smx-accent), var(--smx-accent-2));
|
|
519
|
+
}
|
|
520
|
+
.eda-card h3{
|
|
521
|
+
margin: 0; padding: 10px 12px;
|
|
522
|
+
font-size: 1rem; font-weight: 700; color: #1f2937;
|
|
523
|
+
border-bottom: 1px solid var(--smx-border);
|
|
524
|
+
}
|
|
525
|
+
.eda-card .eda-body{ padding: 10px 12px; }
|
|
526
|
+
|
|
527
|
+
/* Stat tiles harmonised */
|
|
528
|
+
.smx-statwrap{ gap: 12px !important; }
|
|
529
|
+
.smx-stat{
|
|
530
|
+
background: var(--smx-elev1) !important;
|
|
531
|
+
border: 1px solid var(--smx-border) !important;
|
|
532
|
+
box-shadow: 0 2px 10px rgba(16,24,40,.05);
|
|
533
|
+
border-radius: 12px !important;
|
|
534
|
+
}
|
|
535
|
+
.smx-stat h4{ color: var(--smx-muted) !important; letter-spacing:.2px; }
|
|
536
|
+
|
|
537
|
+
/* Buttons */
|
|
538
|
+
button, .btn{
|
|
539
|
+
background: var(--smx-accent);
|
|
540
|
+
color: #fff;
|
|
541
|
+
border: 1px solid #0a66c2;
|
|
542
|
+
border-radius: 10px;
|
|
543
|
+
}
|
|
544
|
+
button:hover, .btn:hover{ background:#0566b1; }
|
|
545
|
+
|
|
546
|
+
/* Forms & selects */
|
|
547
|
+
select, textarea, input[type="text"], input[type="file"]{
|
|
548
|
+
border:1px solid var(--smx-border);
|
|
549
|
+
border-radius:10px;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/* Content panel */
|
|
553
|
+
.dashboard-content{
|
|
554
|
+
background: var(--smx-surface);
|
|
555
|
+
border: 1px solid var(--smx-border);
|
|
556
|
+
border-radius: 14px;
|
|
557
|
+
box-shadow: 0 8px 24px rgba(16,24,40,.05);
|
|
558
|
+
}
|
|
559
|
+
</style>
|
|
560
|
+
<style id="smx-contrast">
|
|
561
|
+
/* Dark slate backdrop for the whole page */
|
|
562
|
+
body.smx-theme.smx-contrast{
|
|
563
|
+
background:
|
|
564
|
+
radial-gradient(1100px 520px at 15% -10%, #16253a 0%, #0f2036 40%, #0b1628 70%, #0a1424 100%),
|
|
565
|
+
linear-gradient(180deg, #0a1424 0%, #0c172a 100%);
|
|
566
|
+
color: #e9eef6;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/* Let the dark backdrop show through; keep content readable */
|
|
570
|
+
.dashboard-main{ background: transparent !important; }
|
|
571
|
+
.dashboard-content{
|
|
572
|
+
background: rgba(255,255,255,0.96) !important;
|
|
573
|
+
border: 1px solid #d4deea !important;
|
|
574
|
+
border-radius: 14px;
|
|
575
|
+
box-shadow: 0 10px 28px rgba(8,20,38,0.28);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/* Cards sit on a brighter surface with clear edge + shadow */
|
|
579
|
+
.eda-card{
|
|
580
|
+
background: #ffffff !important;
|
|
581
|
+
border: 1px solid #d8e3f0 !important;
|
|
582
|
+
border-radius: 14px;
|
|
583
|
+
box-shadow: 0 8px 24px rgba(8,20,38,0.22);
|
|
584
|
+
}
|
|
585
|
+
.eda-card::before{
|
|
586
|
+
background: linear-gradient(90deg, #0b8ae5, #14b8a6);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* Tidy headings/labels inside light surfaces */
|
|
590
|
+
.eda-card h3{ color: #1f2937 !important; }
|
|
591
|
+
.smx-stat h4{ color: #64748b !important; }
|
|
592
|
+
</style>
|
|
420
593
|
|
|
421
594
|
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
422
595
|
</head>
|
|
@@ -439,6 +612,7 @@
|
|
|
439
612
|
<button id="sidebarToggle" class="sidebar-toggle" aria-label="Open menu"></button>
|
|
440
613
|
<ul class="dashboard-tabs">
|
|
441
614
|
<li class="{{ 'active' if section == 'explore' else '' }}"><a href="/dashboard?section=explore">Explore</a></li>
|
|
615
|
+
|
|
442
616
|
</ul>
|
|
443
617
|
<div class="dashboard-content">
|
|
444
618
|
<div class="explore-card">
|
|
@@ -495,65 +669,85 @@
|
|
|
495
669
|
placeholder="Ask me about {{ (selected_dataset or 'your dataset. Upload it first.').replace('_', ' ').replace('.csv', '') }}" required></textarea>
|
|
496
670
|
<button type="submit" style="font-size:1.2rem; width:8rem; padding:4px;">Submit</button>
|
|
497
671
|
</form>
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
672
|
+
<div style="margin-bottom: 36px;">
|
|
673
|
+
{% if askai_question %}
|
|
674
|
+
<!--
|
|
675
|
+
<div class="askai-qblock" style="margin:20px 5px;">
|
|
676
|
+
<span class="askai-q-label"><b>Task:</b></span>
|
|
677
|
+
<span class="askai-q">{{ askai_question }}</span>
|
|
678
|
+
</div>
|
|
679
|
+
-->
|
|
680
|
+
<br><br>
|
|
681
|
+
<div class="refined-qblock">
|
|
682
|
+
<span class="refined-q-label"><b>My Thought Process:</b></span><br>
|
|
683
|
+
<span class="refined-q">{{ refined_question|safe }}</span>
|
|
684
|
+
</div><br>
|
|
685
|
+
<div class="refined-qblock">
|
|
686
|
+
<b>Tasks Performed: </b><br>
|
|
687
|
+
{% for task in tasks %}
|
|
688
|
+
<span class="refined-q">- {{ task.replace('_', ' ').capitalize() + ', ' }}</span><br>
|
|
689
|
+
{% endfor %}
|
|
690
|
+
</div><br>
|
|
691
|
+
{% if llm_usage %}
|
|
505
692
|
<div class="refined-qblock">
|
|
506
|
-
|
|
507
|
-
|
|
693
|
+
<b>LLM: </b><span>{{ llm_usage.provider.capitalize() }} | {{ llm_usage.model }}</span><br>
|
|
694
|
+
<b>Token Usage: </b>
|
|
695
|
+
<li>- Input Tokens: {{ llm_usage.input_tokens }}</li>
|
|
696
|
+
<li>- Output Tokens: {{ llm_usage.output_tokens }}</li>
|
|
697
|
+
<li>- Total Tokens: {{ llm_usage.total_tokens }}</li>
|
|
698
|
+
</ul>
|
|
508
699
|
</div>
|
|
700
|
+
{% endif %}
|
|
509
701
|
{% endif %}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
702
|
+
{% if ai_outputs %}
|
|
703
|
+
<div class="d-flex align-items-center justify-content-between" style="margin: 12px;">
|
|
704
|
+
<h3 class="m-0">Result</h3>
|
|
705
|
+
</div>
|
|
706
|
+
{% for html_block in ai_outputs %}
|
|
707
|
+
<div class="ai-output" style="margin-bottom:18px;overflow-x:auto; max-width:100%;">
|
|
708
|
+
{{ html_block | safe }}
|
|
709
|
+
</div>
|
|
710
|
+
{% endfor %}
|
|
711
|
+
{% endif %}
|
|
712
|
+
{% if ai_code %}
|
|
713
|
+
<div>
|
|
714
|
+
<a href="#" onclick="toggleCode();return false;" id="toggle-link">Show Code</a>
|
|
715
|
+
<div id="ai-code-block" class="code-wrap" style="display:none;">
|
|
716
|
+
{{ highlighted_ai_code|safe }}
|
|
717
|
+
<button type="button" class="code-copy-btn" onclick="copyCode(this)">Copy</button>
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
{% endif %}
|
|
721
|
+
</div>
|
|
722
|
+
<script>
|
|
723
|
+
function toggleCode() {
|
|
724
|
+
var el = document.getElementById('ai-code-block');
|
|
725
|
+
var link = document.getElementById('toggle-link');
|
|
726
|
+
if (el.style.display === 'none') {
|
|
727
|
+
el.style.display = '';
|
|
728
|
+
link.innerText = 'Hide Code';
|
|
729
|
+
} else {
|
|
730
|
+
el.style.display = 'none';
|
|
731
|
+
link.innerText = 'Show Code';
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
</script>
|
|
735
|
+
<div class="eda-grid eda-grid-12">
|
|
736
|
+
{% for cell in data_cells %}
|
|
737
|
+
<section class="eda-card {{ cell.span or '' }}" style="--i: {{ loop.index0 }}">
|
|
738
|
+
<h3>{{ cell.title }}</h3>
|
|
739
|
+
<div class="eda-body">
|
|
740
|
+
{{ cell.output|safe }}
|
|
519
741
|
</div>
|
|
742
|
+
{% if cell.highlighted_code %}
|
|
743
|
+
<details>
|
|
744
|
+
<summary>Show code</summary>
|
|
745
|
+
<div style="margin-top:.5rem">{{ cell.highlighted_code|safe }}</div>
|
|
746
|
+
</details>
|
|
747
|
+
{% endif %}
|
|
748
|
+
</section>
|
|
520
749
|
{% endfor %}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
{% if ai_code %}
|
|
524
|
-
<div>
|
|
525
|
-
<a href="#" onclick="toggleCode();return false;" id="toggle-link">Show Code</a>
|
|
526
|
-
<div id="ai-code-block" class="code-wrap" style="display:none;">
|
|
527
|
-
{{ highlighted_ai_code|safe }}
|
|
528
|
-
<button type="button" class="code-copy-btn" onclick="copyCode(this)">Copy</button>
|
|
529
|
-
</div>
|
|
530
|
-
</div>
|
|
531
|
-
<script>
|
|
532
|
-
function toggleCode() {
|
|
533
|
-
var el = document.getElementById('ai-code-block');
|
|
534
|
-
var link = document.getElementById('toggle-link');
|
|
535
|
-
if (el.style.display === 'none') {
|
|
536
|
-
el.style.display = '';
|
|
537
|
-
link.innerText = 'Hide Code';
|
|
538
|
-
} else {
|
|
539
|
-
el.style.display = 'none';
|
|
540
|
-
link.innerText = 'Show Code';
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
</script>
|
|
544
|
-
{% endif %}
|
|
545
|
-
|
|
546
|
-
{% for cell in data_cells %}
|
|
547
|
-
<h4>{{ cell.title }}</h4>
|
|
548
|
-
<div style="overflow-x:auto; max-width:100%;">
|
|
549
|
-
{{ cell.output|safe }}
|
|
550
|
-
<a href="#" onclick="toggleCodeCell(this); return false;"><span>Show Code</span></a>
|
|
551
|
-
<div class="code-wrap code-cell" style="display:none;">
|
|
552
|
-
{{ cell.highlighted_code|safe }}
|
|
553
|
-
<button type="button" class="code-copy-btn" onclick="copyCode(this)">Copy</button>
|
|
554
|
-
</div>
|
|
555
|
-
</div>
|
|
556
|
-
{% endfor %}
|
|
750
|
+
</div>
|
|
557
751
|
{% endif %}
|
|
558
752
|
</div>
|
|
559
753
|
</div>
|