Upload folder using huggingface_hub
Browse files- .DS_Store +0 -0
- .gitattributes +21 -0
- base_training_with_end_tag_all-131M.txt +3 -0
- base_training_with_end_tag_all-24M.txt +3 -0
- base_training_with_end_tag_en-32M.txt +3 -0
- base_training_with_end_tag_en-7M.txt +3 -0
- base_training_with_end_tag_es-38M.txt +3 -0
- base_training_with_end_tag_es-9M.txt +3 -0
- base_training_with_end_tag_pt-44M.txt +3 -0
- base_training_with_end_tag_pt-9M.txt +3 -0
- base_training_without_end_tag_all-131M.txt +3 -0
- base_training_without_end_tag_all-24M.txt +3 -0
- base_training_without_end_tag_en-32M.txt +3 -0
- base_training_without_end_tag_en-7M.txt +3 -0
- base_training_without_end_tag_es-38M.txt +3 -0
- base_training_without_end_tag_es-9M.txt +3 -0
- base_training_without_end_tag_pt-44M.txt +3 -0
- base_training_without_end_tag_pt-9M.txt +3 -0
- dataset_builder.html +753 -0
- fine_tuning_all-126M.json +3 -0
- fine_tuning_chat-267K.json +0 -0
- fine_tuning_en-31M.json +3 -0
- fine_tuning_es-35M.json +3 -0
- fine_tuning_pt-42M.json +3 -0
- fine_tuning_sapiens_chat-171K.json +0 -0
- fine_tuning_sapiens_chat-70K.json +0 -0
- fine_tuning_sapiens_technology-360K.json +0 -0
- fine_tuning_webapps-6M.json +3 -0
.DS_Store
ADDED
|
Binary file (18.4 kB). View file
|
|
|
.gitattributes
CHANGED
|
@@ -58,3 +58,24 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
base_training_with_end_tag_all-131M.txt filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
base_training_with_end_tag_all-24M.txt filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
base_training_with_end_tag_en-32M.txt filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
base_training_with_end_tag_en-7M.txt filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
base_training_with_end_tag_es-38M.txt filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
base_training_with_end_tag_es-9M.txt filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
base_training_with_end_tag_pt-44M.txt filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
base_training_with_end_tag_pt-9M.txt filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
base_training_without_end_tag_all-131M.txt filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
base_training_without_end_tag_all-24M.txt filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
base_training_without_end_tag_en-32M.txt filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
base_training_without_end_tag_en-7M.txt filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
base_training_without_end_tag_es-38M.txt filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
base_training_without_end_tag_es-9M.txt filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
base_training_without_end_tag_pt-44M.txt filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
base_training_without_end_tag_pt-9M.txt filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
fine_tuning_all-126M.json filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
fine_tuning_en-31M.json filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
fine_tuning_es-35M.json filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
fine_tuning_pt-42M.json filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
fine_tuning_webapps-6M.json filter=lfs diff=lfs merge=lfs -text
|
base_training_with_end_tag_all-131M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9abd2e74c57e20c6dcb316c5979b71a1967b39fe7aac90c1fc29029cfc47ca37
|
| 3 |
+
size 484610046
|
base_training_with_end_tag_all-24M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58c30b15d223bd52e2cc3e3e961673b7e17d84926be2685dedbbb3e01ced0537
|
| 3 |
+
size 104609153
|
base_training_with_end_tag_en-32M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:503dbd86a1046a506cba539871d569bd7b4e9e7a2ee5a6176114a3a0df9ba7c1
|
| 3 |
+
size 143409422
|
base_training_with_end_tag_en-7M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78303ca9df82c601956a8596b2479ffe8da774c33e4dd7be514ace033dd1f0bb
|
| 3 |
+
size 37702845
|
base_training_with_end_tag_es-38M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6bef3f7a479bda473d043b8608621da2a6731ac267bcc5829d2ec8ce7edfeb6
|
| 3 |
+
size 138574117
|
base_training_with_end_tag_es-9M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a5e1eebc372a0b1d8e47f5ff0538d76533f690fc08bc169cfe6e9f0e568b3e8
|
| 3 |
+
size 35753179
|
base_training_with_end_tag_pt-44M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16dce5b5f530f3071f1df048fa9742df447b915b58a7ef2985d01c21ed097a5e
|
| 3 |
+
size 153307959
|
base_training_with_end_tag_pt-9M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ede3a41c5313f9a3f0c920de25cb32e47a541597e881bc7e508beda45d734434
|
| 3 |
+
size 31153127
|
base_training_without_end_tag_all-131M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6de3adbe945f01137ac4d63ede940db25d5676b18049cd728f3e2edeff025300
|
| 3 |
+
size 469218231
|
base_training_without_end_tag_all-24M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a385e84574c1252a8503ab058c4bfbd328bd686c33c528998f37c4cefb6a06aa
|
| 3 |
+
size 103838706
|
base_training_without_end_tag_en-32M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cbb55471620bb270afa40ffe1fbc08716cc84c95154ea1f70a79dd28ca40265c
|
| 3 |
+
size 138317932
|
base_training_without_end_tag_en-7M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f02ad9fdf421b144b40f3695d65978c2a897089b91ecd1161ed9a655006cdae6
|
| 3 |
+
size 37443500
|
base_training_without_end_tag_es-38M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5dbd640fe3969fd7f71054990f2f1a45cd223584215ed19737a81b85fc5afede
|
| 3 |
+
size 133743957
|
base_training_without_end_tag_es-9M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31b11e18815783ad5a9521db3affdfd5e186b1ac037e8015c4fda4af3a44bff7
|
| 3 |
+
size 35498091
|
base_training_without_end_tag_pt-44M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22ee44c3acb7cc581962e8212b7fbec36ff2bf9b66aa9de19c5310a7033d22b6
|
| 3 |
+
size 148084616
|
base_training_without_end_tag_pt-9M.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df578bdfa991c5a660bbc043bf3ea19a4ba43b0a0ab189957d2d069763623c40
|
| 3 |
+
size 30897113
|
dataset_builder.html
ADDED
|
@@ -0,0 +1,753 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.0">
|
| 6 |
+
<title>Modern Dataset Builder</title>
|
| 7 |
+
|
| 8 |
+
<!-- Marked.js -->
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/marked@4.3.0/marked.min.js"></script>
|
| 10 |
+
<!-- Phosphor Icons (para ícones mais bonitos) -->
|
| 11 |
+
<script src="https://unpkg.com/@phosphor-icons/web"></script>
|
| 12 |
+
|
| 13 |
+
<style>
|
| 14 |
+
:root {
|
| 15 |
+
/* Palette: Indigo & Slate */
|
| 16 |
+
--primary: #4f46e5;
|
| 17 |
+
--primary-hover: #4338ca;
|
| 18 |
+
--secondary: #64748b;
|
| 19 |
+
--danger: #ef4444;
|
| 20 |
+
--danger-hover: #dc2626;
|
| 21 |
+
--success: #22c55e;
|
| 22 |
+
--bg: #f1f5f9;
|
| 23 |
+
--surface: #ffffff;
|
| 24 |
+
--border: #e2e8f0;
|
| 25 |
+
--text-main: #1e293b;
|
| 26 |
+
--text-muted: #64748b;
|
| 27 |
+
--shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
|
| 28 |
+
--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
|
| 29 |
+
--radius: 12px;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
* { box-sizing: border-box; }
|
| 33 |
+
|
| 34 |
+
body {
|
| 35 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
| 36 |
+
background-color: var(--bg);
|
| 37 |
+
color: var(--text-main);
|
| 38 |
+
margin: 0;
|
| 39 |
+
padding: 40px 20px;
|
| 40 |
+
line-height: 1.5;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.container {
|
| 44 |
+
max-width: 1000px;
|
| 45 |
+
margin: 0 auto;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
h1 {
|
| 49 |
+
text-align: center;
|
| 50 |
+
color: var(--text-main);
|
| 51 |
+
margin-bottom: 40px;
|
| 52 |
+
font-weight: 800;
|
| 53 |
+
letter-spacing: -0.025em;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
/* --- Card Styles --- */
|
| 57 |
+
.card {
|
| 58 |
+
background: var(--surface);
|
| 59 |
+
padding: 30px;
|
| 60 |
+
border-radius: var(--radius);
|
| 61 |
+
box-shadow: var(--shadow-md);
|
| 62 |
+
margin-bottom: 30px;
|
| 63 |
+
border: 1px solid var(--border);
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
/* --- Form --- */
|
| 67 |
+
.form-title {
|
| 68 |
+
margin-top: 0;
|
| 69 |
+
display: flex;
|
| 70 |
+
align-items: center;
|
| 71 |
+
gap: 10px;
|
| 72 |
+
color: var(--primary);
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.form-group { margin-bottom: 20px; }
|
| 76 |
+
|
| 77 |
+
label {
|
| 78 |
+
display: block;
|
| 79 |
+
font-weight: 600;
|
| 80 |
+
margin-bottom: 8px;
|
| 81 |
+
color: var(--text-main);
|
| 82 |
+
font-size: 0.95rem;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
textarea {
|
| 86 |
+
width: 100%;
|
| 87 |
+
padding: 15px;
|
| 88 |
+
border: 1px solid var(--border);
|
| 89 |
+
border-radius: 8px;
|
| 90 |
+
font-family: monospace;
|
| 91 |
+
font-size: 14px;
|
| 92 |
+
resize: vertical;
|
| 93 |
+
transition: border-color 0.2s, box-shadow 0.2s;
|
| 94 |
+
background: #f8fafc;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
textarea:focus {
|
| 98 |
+
outline: none;
|
| 99 |
+
border-color: var(--primary);
|
| 100 |
+
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
| 101 |
+
background: #fff;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* --- Buttons --- */
|
| 105 |
+
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
|
| 106 |
+
|
| 107 |
+
button {
|
| 108 |
+
padding: 10px 20px;
|
| 109 |
+
border: none;
|
| 110 |
+
border-radius: 8px;
|
| 111 |
+
cursor: pointer;
|
| 112 |
+
font-weight: 600;
|
| 113 |
+
font-size: 0.95rem;
|
| 114 |
+
transition: all 0.2s;
|
| 115 |
+
display: inline-flex;
|
| 116 |
+
align-items: center;
|
| 117 |
+
justify-content: center;
|
| 118 |
+
gap: 8px;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
button:active { transform: translateY(1px); }
|
| 122 |
+
|
| 123 |
+
.btn-primary { background-color: var(--primary); color: white; }
|
| 124 |
+
.btn-primary:hover { background-color: var(--primary-hover); }
|
| 125 |
+
|
| 126 |
+
.btn-danger { background-color: var(--danger); color: white; }
|
| 127 |
+
.btn-danger:hover { background-color: var(--danger-hover); }
|
| 128 |
+
|
| 129 |
+
.btn-success { background-color: var(--success); color: white; }
|
| 130 |
+
.btn-success:hover { filter: brightness(90%); }
|
| 131 |
+
|
| 132 |
+
.btn-secondary { background-color: var(--surface); border: 1px solid var(--border); color: var(--text-main); }
|
| 133 |
+
.btn-secondary:hover { background-color: #f8fafc; border-color: #cbd5e1; }
|
| 134 |
+
|
| 135 |
+
.btn-icon { padding: 8px; border-radius: 6px; }
|
| 136 |
+
|
| 137 |
+
/* --- Toolbar (Search & Global Actions) --- */
|
| 138 |
+
.toolbar {
|
| 139 |
+
display: flex;
|
| 140 |
+
justify-content: space-between;
|
| 141 |
+
align-items: center;
|
| 142 |
+
gap: 20px;
|
| 143 |
+
margin-bottom: 20px;
|
| 144 |
+
flex-wrap: wrap;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.search-box {
|
| 148 |
+
flex: 1;
|
| 149 |
+
position: relative;
|
| 150 |
+
min-width: 250px;
|
| 151 |
+
}
|
| 152 |
+
.search-box input {
|
| 153 |
+
width: 100%;
|
| 154 |
+
padding: 10px 15px 10px 40px;
|
| 155 |
+
border-radius: 8px;
|
| 156 |
+
border: 1px solid var(--border);
|
| 157 |
+
font-size: 1rem;
|
| 158 |
+
}
|
| 159 |
+
.search-box i {
|
| 160 |
+
position: absolute;
|
| 161 |
+
left: 12px;
|
| 162 |
+
top: 50%;
|
| 163 |
+
transform: translateY(-50%);
|
| 164 |
+
color: var(--text-muted);
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
/* --- List --- */
|
| 168 |
+
.list-header-info {
|
| 169 |
+
font-weight: 700; color: var(--text-muted); margin-bottom: 10px;
|
| 170 |
+
display: flex; justify-content: space-between; align-items: center;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.accordion-item {
|
| 174 |
+
background: var(--surface);
|
| 175 |
+
border: 1px solid var(--border);
|
| 176 |
+
border-radius: 8px;
|
| 177 |
+
margin-bottom: 12px;
|
| 178 |
+
overflow: hidden;
|
| 179 |
+
transition: box-shadow 0.2s;
|
| 180 |
+
}
|
| 181 |
+
.accordion-item:hover { box-shadow: var(--shadow-sm); }
|
| 182 |
+
|
| 183 |
+
.accordion-header {
|
| 184 |
+
padding: 15px 20px;
|
| 185 |
+
cursor: pointer;
|
| 186 |
+
display: flex; justify-content: space-between; align-items: center;
|
| 187 |
+
user-select: none;
|
| 188 |
+
background: #fff;
|
| 189 |
+
}
|
| 190 |
+
.accordion-header:hover { background-color: #f8fafc; }
|
| 191 |
+
|
| 192 |
+
.header-content {
|
| 193 |
+
display: flex; align-items: center; gap: 15px; flex: 1; overflow: hidden;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.id-badge {
|
| 197 |
+
background: #e0e7ff; color: var(--primary);
|
| 198 |
+
padding: 4px 8px; border-radius: 6px; font-size: 0.8em; font-weight: 700;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
.preview-text {
|
| 202 |
+
color: var(--text-main);
|
| 203 |
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
| 204 |
+
font-weight: 500;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
.header-actions {
|
| 208 |
+
display: flex; gap: 8px; align-items: center; margin-left: 15px;
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.accordion-content {
|
| 212 |
+
display: none; border-top: 1px solid var(--border);
|
| 213 |
+
background-color: #fafafa; padding: 25px;
|
| 214 |
+
}
|
| 215 |
+
.accordion-item.active .accordion-content { display: block; animation: slideDown 0.2s ease-out; }
|
| 216 |
+
.accordion-item.active .caret-icon { transform: rotate(180deg); }
|
| 217 |
+
.caret-icon { transition: transform 0.2s; color: var(--text-muted); }
|
| 218 |
+
|
| 219 |
+
/* --- Tabs in Item --- */
|
| 220 |
+
.item-tabs { display: flex; gap: 2px; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
|
| 221 |
+
.tab-btn {
|
| 222 |
+
background: transparent; border: none; padding: 10px 20px; cursor: pointer;
|
| 223 |
+
color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
|
| 224 |
+
border-radius: 6px 6px 0 0;
|
| 225 |
+
}
|
| 226 |
+
.tab-btn:hover { color: var(--primary); background: rgba(79, 70, 229, 0.05); }
|
| 227 |
+
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; background: #fff; border: 1px solid var(--border); border-bottom-color: #fff; }
|
| 228 |
+
|
| 229 |
+
.tab-content { display: none; }
|
| 230 |
+
.tab-content.active { display: block; }
|
| 231 |
+
|
| 232 |
+
.field-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin: 15px 0 5px; display: flex; justify-content: space-between;}
|
| 233 |
+
.data-box { background: #fff; border: 1px solid var(--border); padding: 15px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; color: var(--text-main); font-family: monospace; font-size: 0.9em; }
|
| 234 |
+
|
| 235 |
+
/* --- Pagination --- */
|
| 236 |
+
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 30px; }
|
| 237 |
+
.page-info { color: var(--text-muted); font-size: 0.9em; }
|
| 238 |
+
|
| 239 |
+
/* --- Modal Custom --- */
|
| 240 |
+
.modal-overlay {
|
| 241 |
+
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
| 242 |
+
background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
|
| 243 |
+
display: flex; justify-content: center; align-items: center;
|
| 244 |
+
z-index: 1000; opacity: 0; pointer-events: none;
|
| 245 |
+
transition: opacity 0.2s;
|
| 246 |
+
}
|
| 247 |
+
.modal-overlay.open { opacity: 1; pointer-events: auto; }
|
| 248 |
+
|
| 249 |
+
.modal {
|
| 250 |
+
background: white; width: 90%; max-width: 450px;
|
| 251 |
+
border-radius: 16px; padding: 25px;
|
| 252 |
+
box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
|
| 253 |
+
transform: scale(0.95); transition: transform 0.2s;
|
| 254 |
+
}
|
| 255 |
+
.modal-overlay.open .modal { transform: scale(1); }
|
| 256 |
+
|
| 257 |
+
.modal h3 { margin-top: 0; color: var(--text-main); }
|
| 258 |
+
.modal p { color: var(--text-muted); margin-bottom: 25px; }
|
| 259 |
+
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
|
| 260 |
+
|
| 261 |
+
/* File input hidden */
|
| 262 |
+
#fileInput { display: none; }
|
| 263 |
+
|
| 264 |
+
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
|
| 265 |
+
</style>
|
| 266 |
+
</head>
|
| 267 |
+
<body>
|
| 268 |
+
|
| 269 |
+
<div class="container">
|
| 270 |
+
<h1>Dataset Builder</h1>
|
| 271 |
+
|
| 272 |
+
<!-- Editor Card -->
|
| 273 |
+
<div class="card">
|
| 274 |
+
<h3 id="formTitle" class="form-title"><i class="ph ph-pencil-simple"></i> New Record</h3>
|
| 275 |
+
<form id="datasetForm">
|
| 276 |
+
<div class="form-group">
|
| 277 |
+
<label for="input">Input</label>
|
| 278 |
+
<textarea id="input" name="input" rows="10" placeholder="Type the input text here..."></textarea>
|
| 279 |
+
</div>
|
| 280 |
+
<div class="form-group">
|
| 281 |
+
<label for="output">Output</label>
|
| 282 |
+
<textarea id="output" name="output" rows="10" placeholder="Type the expected output here..."></textarea>
|
| 283 |
+
</div>
|
| 284 |
+
<div class="btn-group">
|
| 285 |
+
<button type="submit" class="btn-primary" id="saveBtn"><i class="ph ph-floppy-disk"></i> Save Record</button>
|
| 286 |
+
<button type="button" class="btn-secondary" id="cancelBtn" style="display: none;"><i class="ph ph-x"></i> Cancel</button>
|
| 287 |
+
</div>
|
| 288 |
+
</form>
|
| 289 |
+
</div>
|
| 290 |
+
|
| 291 |
+
<!-- Toolbar -->
|
| 292 |
+
<div class="toolbar">
|
| 293 |
+
<div class="search-box">
|
| 294 |
+
<i class="ph ph-magnifying-glass"></i>
|
| 295 |
+
<input type="text" id="searchInput" placeholder="Search inputs..." onkeyup="handleSearch()" autocomplete="off">
|
| 296 |
+
</div>
|
| 297 |
+
<div class="btn-group">
|
| 298 |
+
<input type="file" id="fileInput" accept=".json" onchange="processFile(this)">
|
| 299 |
+
<button onclick="document.getElementById('fileInput').click()" class="btn-secondary">
|
| 300 |
+
<i class="ph ph-upload-simple"></i> Import JSON
|
| 301 |
+
</button>
|
| 302 |
+
<button onclick="downloadJSON()" class="btn-success">
|
| 303 |
+
<i class="ph ph-download-simple"></i> Export JSON
|
| 304 |
+
</button>
|
| 305 |
+
<button onclick="confirmDeleteAll()" class="btn-danger">
|
| 306 |
+
<i class="ph ph-trash"></i> Delete All
|
| 307 |
+
</button>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
|
| 311 |
+
<!-- List Stats -->
|
| 312 |
+
<div class="list-header-info">
|
| 313 |
+
<span>Total Records: <span id="totalCount">0</span></span>
|
| 314 |
+
<span>Showing: <span id="showingCount">0</span></span>
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
<!-- List Container -->
|
| 318 |
+
<div id="listContainer"></div>
|
| 319 |
+
|
| 320 |
+
<!-- Pagination -->
|
| 321 |
+
<div class="pagination" id="paginationControls">
|
| 322 |
+
<button class="btn-secondary btn-icon" id="prevPageBtn" onclick="changePage(-1)"><i class="ph ph-caret-left"></i></button>
|
| 323 |
+
<span class="page-info">Page <span id="currPageDisplay">1</span> of <span id="totalPageDisplay">1</span></span>
|
| 324 |
+
<button class="btn-secondary btn-icon" id="nextPageBtn" onclick="changePage(1)"><i class="ph ph-caret-right"></i></button>
|
| 325 |
+
</div>
|
| 326 |
+
</div>
|
| 327 |
+
|
| 328 |
+
<!-- Custom Modal -->
|
| 329 |
+
<div class="modal-overlay" id="customModal">
|
| 330 |
+
<div class="modal">
|
| 331 |
+
<h3 id="modalTitle">Title</h3>
|
| 332 |
+
<p id="modalMessage">Message goes here</p>
|
| 333 |
+
<div class="modal-actions">
|
| 334 |
+
<button class="btn-secondary" id="modalCancelBtn">Cancel</button>
|
| 335 |
+
<button class="btn-primary" id="modalConfirmBtn">Confirm</button>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
</div>
|
| 339 |
+
|
| 340 |
+
<script>
|
| 341 |
+
// State
|
| 342 |
+
let dataset = [];
|
| 343 |
+
let filteredDataset = [];
|
| 344 |
+
let editingIndex = -1; // Index in the original dataset
|
| 345 |
+
let currentPage = 1;
|
| 346 |
+
const itemsPerPage = 10;
|
| 347 |
+
let searchTerm = "";
|
| 348 |
+
|
| 349 |
+
// Elements
|
| 350 |
+
const form = document.getElementById('datasetForm');
|
| 351 |
+
const inputField = document.getElementById('input');
|
| 352 |
+
const outputField = document.getElementById('output');
|
| 353 |
+
const listContainer = document.getElementById('listContainer');
|
| 354 |
+
const saveBtn = document.getElementById('saveBtn');
|
| 355 |
+
const cancelBtn = document.getElementById('cancelBtn');
|
| 356 |
+
const formTitle = document.getElementById('formTitle');
|
| 357 |
+
const modalOverlay = document.getElementById('customModal');
|
| 358 |
+
|
| 359 |
+
// Init
|
| 360 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 361 |
+
if (typeof marked !== 'undefined') marked.setOptions({ breaks: true, gfm: true });
|
| 362 |
+
loadFromStorage();
|
| 363 |
+
filterAndRender();
|
| 364 |
+
});
|
| 365 |
+
|
| 366 |
+
// --- Core Functions ---
|
| 367 |
+
|
| 368 |
+
form.addEventListener('submit', (e) => {
|
| 369 |
+
e.preventDefault();
|
| 370 |
+
const inputVal = inputField.value;
|
| 371 |
+
const outputVal = outputField.value;
|
| 372 |
+
|
| 373 |
+
if (!inputVal.trim() && !outputVal.trim()) {
|
| 374 |
+
showAlert("Validation", "Please fill in at least one field.");
|
| 375 |
+
return;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
const record = { input: inputVal, output: outputVal };
|
| 379 |
+
|
| 380 |
+
if (editingIndex >= 0) {
|
| 381 |
+
dataset[editingIndex] = record;
|
| 382 |
+
showAlert("Success", "Record updated successfully!", "success");
|
| 383 |
+
editingIndex = -1;
|
| 384 |
+
} else {
|
| 385 |
+
dataset.push(record);
|
| 386 |
+
showAlert("Success", "New record added!", "success");
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
saveToStorage();
|
| 390 |
+
resetForm();
|
| 391 |
+
filterAndRender(); // Re-filters and goes to page 1 or current
|
| 392 |
+
});
|
| 393 |
+
|
| 394 |
+
function handleSearch() {
|
| 395 |
+
searchTerm = document.getElementById('searchInput').value.toLowerCase();
|
| 396 |
+
currentPage = 1; // Reset to page 1 on search
|
| 397 |
+
filterAndRender();
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
function filterAndRender() {
|
| 401 |
+
// 1. Filter
|
| 402 |
+
if (!searchTerm) {
|
| 403 |
+
filteredDataset = dataset.map((item, index) => ({...item, originalIndex: index}));
|
| 404 |
+
} else {
|
| 405 |
+
filteredDataset = dataset
|
| 406 |
+
.map((item, index) => ({...item, originalIndex: index}))
|
| 407 |
+
.filter(item => item.input.toLowerCase().includes(searchTerm));
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
// 2. Update Stats
|
| 411 |
+
document.getElementById('totalCount').innerText = dataset.length;
|
| 412 |
+
document.getElementById('showingCount').innerText = filteredDataset.length;
|
| 413 |
+
|
| 414 |
+
// 3. Pagination Logic
|
| 415 |
+
const totalPages = Math.ceil(filteredDataset.length / itemsPerPage) || 1;
|
| 416 |
+
if (currentPage > totalPages) currentPage = totalPages;
|
| 417 |
+
if (currentPage < 1) currentPage = 1;
|
| 418 |
+
|
| 419 |
+
const start = (currentPage - 1) * itemsPerPage;
|
| 420 |
+
const end = start + itemsPerPage;
|
| 421 |
+
const pageData = filteredDataset.slice(start, end);
|
| 422 |
+
|
| 423 |
+
// 4. Render
|
| 424 |
+
renderList(pageData);
|
| 425 |
+
updatePaginationControls(totalPages);
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
function renderList(pageData) {
|
| 429 |
+
listContainer.innerHTML = '';
|
| 430 |
+
|
| 431 |
+
if (pageData.length === 0) {
|
| 432 |
+
listContainer.innerHTML = `
|
| 433 |
+
<div style="text-align:center; padding:60px; color:var(--text-muted);">
|
| 434 |
+
<i class="ph ph-tray" style="font-size: 3em; margin-bottom:10px;"></i><br>
|
| 435 |
+
No records found.
|
| 436 |
+
</div>`;
|
| 437 |
+
return;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
pageData.forEach((item) => {
|
| 441 |
+
const div = document.createElement('div');
|
| 442 |
+
div.className = 'accordion-item';
|
| 443 |
+
div.id = `item-${item.originalIndex}`;
|
| 444 |
+
|
| 445 |
+
const previewText = item.input.length > 80
|
| 446 |
+
? item.input.substring(0, 80).replace(/\n/g, ' ') + '...'
|
| 447 |
+
: item.input.replace(/\n/g, ' ');
|
| 448 |
+
|
| 449 |
+
// Markdown rendering
|
| 450 |
+
let mdRendered = "<i>Markdown library not loaded.</i>";
|
| 451 |
+
let mdRaw = `### Record\n\n**Input:**\n${safeForMarkdown(item.input)}\n\n**Output:**\n${safeForMarkdown(item.output)}`;
|
| 452 |
+
if (typeof marked !== 'undefined') {
|
| 453 |
+
mdRendered = marked.parse(mdRaw);
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
div.innerHTML = `
|
| 457 |
+
<div class="accordion-header" onclick="toggleAccordion(${item.originalIndex})">
|
| 458 |
+
<div class="header-content">
|
| 459 |
+
<span class="id-badge">#${item.originalIndex + 1}</span>
|
| 460 |
+
<span class="preview-text">${escapeHtml(previewText)}</span>
|
| 461 |
+
</div>
|
| 462 |
+
|
| 463 |
+
<div class="header-actions">
|
| 464 |
+
<!-- Side Buttons (Stop Propagation) -->
|
| 465 |
+
<button onclick="editItem(event, ${item.originalIndex})" class="btn-secondary btn-icon" title="Edit">
|
| 466 |
+
<i class="ph ph-pencil-simple"></i>
|
| 467 |
+
</button>
|
| 468 |
+
<button onclick="confirmDeleteItem(event, ${item.originalIndex})" class="btn-danger btn-icon" title="Delete">
|
| 469 |
+
<i class="ph ph-trash"></i>
|
| 470 |
+
</button>
|
| 471 |
+
<i class="ph ph-caret-down caret-icon" style="margin-left:10px;"></i>
|
| 472 |
+
</div>
|
| 473 |
+
</div>
|
| 474 |
+
|
| 475 |
+
<div class="accordion-content">
|
| 476 |
+
<div class="item-tabs">
|
| 477 |
+
<button class="tab-btn active" onclick="switchTab(event, 'view-data-${item.originalIndex}')">Raw Data</button>
|
| 478 |
+
<button class="tab-btn" onclick="switchTab(event, 'view-md-${item.originalIndex}')">Rendered Markdown</button>
|
| 479 |
+
</div>
|
| 480 |
+
|
| 481 |
+
<div id="view-data-${item.originalIndex}" class="tab-content active">
|
| 482 |
+
<div class="field-label">Input</div>
|
| 483 |
+
<div class="data-box">${escapeHtml(item.input)}</div>
|
| 484 |
+
|
| 485 |
+
<div class="field-label">
|
| 486 |
+
<span>Output</span>
|
| 487 |
+
<button onclick="copyOutput(${item.originalIndex})" style="padding:2px 8px; font-size:0.75rem;" class="btn-secondary">
|
| 488 |
+
<i class="ph ph-copy"></i> Copy
|
| 489 |
+
</button>
|
| 490 |
+
</div>
|
| 491 |
+
<div class="data-box">${escapeHtml(item.output)}</div>
|
| 492 |
+
</div>
|
| 493 |
+
|
| 494 |
+
<div id="view-md-${item.originalIndex}" class="tab-content">
|
| 495 |
+
<div style="background:#fff; padding:20px; border:1px solid var(--border); border-radius:8px;">
|
| 496 |
+
${mdRendered}
|
| 497 |
+
</div>
|
| 498 |
+
</div>
|
| 499 |
+
</div>
|
| 500 |
+
`;
|
| 501 |
+
listContainer.appendChild(div);
|
| 502 |
+
});
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
// --- Actions ---
|
| 506 |
+
|
| 507 |
+
function editItem(e, index) {
|
| 508 |
+
e.stopPropagation(); // Don't open accordion
|
| 509 |
+
const item = dataset[index];
|
| 510 |
+
inputField.value = item.input;
|
| 511 |
+
outputField.value = item.output;
|
| 512 |
+
editingIndex = index;
|
| 513 |
+
|
| 514 |
+
saveBtn.innerHTML = '<i class="ph ph-arrows-clockwise"></i> Update Record';
|
| 515 |
+
saveBtn.classList.remove('btn-primary');
|
| 516 |
+
saveBtn.classList.add('btn-success');
|
| 517 |
+
|
| 518 |
+
cancelBtn.style.display = 'inline-flex';
|
| 519 |
+
formTitle.innerHTML = `<i class="ph ph-pencil-simple"></i> Editing Record #${index + 1}`;
|
| 520 |
+
|
| 521 |
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
| 522 |
+
inputField.focus();
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
function confirmDeleteItem(e, index) {
|
| 526 |
+
e.stopPropagation();
|
| 527 |
+
showConfirm(
|
| 528 |
+
"Delete Record",
|
| 529 |
+
"Are you sure you want to delete this record? This cannot be undone.",
|
| 530 |
+
() => deleteItem(index),
|
| 531 |
+
"Delete",
|
| 532 |
+
"danger"
|
| 533 |
+
);
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
function deleteItem(index) {
|
| 537 |
+
dataset.splice(index, 1);
|
| 538 |
+
if (editingIndex === index) resetForm();
|
| 539 |
+
saveToStorage();
|
| 540 |
+
filterAndRender();
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
function confirmDeleteAll() {
|
| 544 |
+
if (dataset.length === 0) return showAlert("Info", "No records to delete.");
|
| 545 |
+
showConfirm(
|
| 546 |
+
"Delete All Records",
|
| 547 |
+
"⚠️ Are you sure you want to delete ALL records? This action is irreversible.",
|
| 548 |
+
() => {
|
| 549 |
+
dataset = [];
|
| 550 |
+
resetForm();
|
| 551 |
+
saveToStorage();
|
| 552 |
+
filterAndRender();
|
| 553 |
+
},
|
| 554 |
+
"Delete All",
|
| 555 |
+
"danger"
|
| 556 |
+
);
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
function resetForm() {
|
| 560 |
+
form.reset();
|
| 561 |
+
editingIndex = -1;
|
| 562 |
+
saveBtn.innerHTML = '<i class="ph ph-floppy-disk"></i> Save Record';
|
| 563 |
+
saveBtn.classList.add('btn-primary');
|
| 564 |
+
saveBtn.classList.remove('btn-success');
|
| 565 |
+
cancelBtn.style.display = 'none';
|
| 566 |
+
formTitle.innerHTML = '<i class="ph ph-pencil-simple"></i> New Record';
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
cancelBtn.addEventListener('click', resetForm);
|
| 570 |
+
|
| 571 |
+
// --- JSON Import/Export ---
|
| 572 |
+
|
| 573 |
+
function downloadJSON() {
|
| 574 |
+
if (dataset.length === 0) return showAlert("Info", "Nothing to download.");
|
| 575 |
+
const dataStr = JSON.stringify(dataset, null, 4);
|
| 576 |
+
const blob = new Blob([dataStr], { type: "application/json;charset=utf-8" });
|
| 577 |
+
const url = URL.createObjectURL(blob);
|
| 578 |
+
const a = document.createElement('a');
|
| 579 |
+
a.href = url;
|
| 580 |
+
a.download = `dataset_${new Date().toISOString().slice(0,10)}.json`;
|
| 581 |
+
a.click();
|
| 582 |
+
URL.revokeObjectURL(url);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
function processFile(input) {
|
| 586 |
+
const file = input.files[0];
|
| 587 |
+
if (!file) return;
|
| 588 |
+
|
| 589 |
+
const reader = new FileReader();
|
| 590 |
+
reader.onload = (e) => {
|
| 591 |
+
try {
|
| 592 |
+
let importedData = JSON.parse(e.target.result);
|
| 593 |
+
|
| 594 |
+
// Handle wrapped data { data: [...] } or raw array [...]
|
| 595 |
+
if (!Array.isArray(importedData) && importedData.data && Array.isArray(importedData.data)) {
|
| 596 |
+
importedData = importedData.data;
|
| 597 |
+
} else if (!Array.isArray(importedData)) {
|
| 598 |
+
throw new Error("Invalid JSON format. Expected an array.");
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
let addedCount = 0;
|
| 602 |
+
|
| 603 |
+
// Deduplication Logic
|
| 604 |
+
importedData.forEach(newItem => {
|
| 605 |
+
if (!newItem.input && !newItem.output) return; // Skip empty
|
| 606 |
+
|
| 607 |
+
// Check if exists
|
| 608 |
+
const exists = dataset.some(existing =>
|
| 609 |
+
existing.input === newItem.input && existing.output === newItem.output
|
| 610 |
+
);
|
| 611 |
+
|
| 612 |
+
if (!exists) {
|
| 613 |
+
dataset.push({ input: newItem.input, output: newItem.output });
|
| 614 |
+
addedCount++;
|
| 615 |
+
}
|
| 616 |
+
});
|
| 617 |
+
|
| 618 |
+
saveToStorage();
|
| 619 |
+
filterAndRender();
|
| 620 |
+
input.value = ''; // Reset file input
|
| 621 |
+
|
| 622 |
+
if (addedCount > 0) {
|
| 623 |
+
showAlert("Import Successful", `Successfully imported ${addedCount} new records. Duplicates were skipped.`, "success");
|
| 624 |
+
} else {
|
| 625 |
+
showAlert("Import Info", "No new records were added. All records already existed.", "normal");
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
} catch (err) {
|
| 629 |
+
showAlert("Import Error", "Failed to parse JSON file. Make sure format is correct.", "danger");
|
| 630 |
+
console.error(err);
|
| 631 |
+
}
|
| 632 |
+
};
|
| 633 |
+
reader.readAsText(file);
|
| 634 |
+
}
|
| 635 |
+
|
| 636 |
+
// --- UI Helpers ---
|
| 637 |
+
|
| 638 |
+
function changePage(delta) {
|
| 639 |
+
const totalPages = Math.ceil(filteredDataset.length / itemsPerPage) || 1;
|
| 640 |
+
const newPage = currentPage + delta;
|
| 641 |
+
if (newPage >= 1 && newPage <= totalPages) {
|
| 642 |
+
currentPage = newPage;
|
| 643 |
+
filterAndRender();
|
| 644 |
+
window.scrollTo({ top: document.querySelector('.list-header-info').offsetTop - 20, behavior: 'smooth' });
|
| 645 |
+
}
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
function updatePaginationControls(totalPages) {
|
| 649 |
+
document.getElementById('currPageDisplay').innerText = currentPage;
|
| 650 |
+
document.getElementById('totalPageDisplay').innerText = totalPages;
|
| 651 |
+
document.getElementById('prevPageBtn').disabled = currentPage === 1;
|
| 652 |
+
document.getElementById('nextPageBtn').disabled = currentPage === totalPages;
|
| 653 |
+
|
| 654 |
+
// Visual disable style
|
| 655 |
+
document.getElementById('prevPageBtn').style.opacity = currentPage === 1 ? '0.5' : '1';
|
| 656 |
+
document.getElementById('nextPageBtn').style.opacity = currentPage === totalPages ? '0.5' : '1';
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
function toggleAccordion(originalIndex) {
|
| 660 |
+
const item = document.getElementById(`item-${originalIndex}`);
|
| 661 |
+
item.classList.toggle('active');
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
function switchTab(event, tabId) {
|
| 665 |
+
event.stopPropagation();
|
| 666 |
+
const contentDiv = event.target.closest('.accordion-content');
|
| 667 |
+
contentDiv.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));
|
| 668 |
+
contentDiv.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
|
| 669 |
+
event.target.classList.add('active');
|
| 670 |
+
document.getElementById(tabId).classList.add('active');
|
| 671 |
+
}
|
| 672 |
+
|
| 673 |
+
function copyOutput(index) {
|
| 674 |
+
const item = dataset[index];
|
| 675 |
+
if(!item.output) return showAlert("Info", "Output is empty.");
|
| 676 |
+
copyToClipboard(item.output, "Output copied to clipboard!");
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
function copyToClipboard(text, successMsg) {
|
| 680 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 681 |
+
showAlert("Success", successMsg, "success");
|
| 682 |
+
}).catch(err => {
|
| 683 |
+
// Fallback
|
| 684 |
+
const txt = document.createElement("textarea");
|
| 685 |
+
txt.value = text;
|
| 686 |
+
document.body.appendChild(txt);
|
| 687 |
+
txt.select();
|
| 688 |
+
document.execCommand("copy");
|
| 689 |
+
document.body.removeChild(txt);
|
| 690 |
+
showAlert("Success", successMsg, "success");
|
| 691 |
+
});
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
// --- Custom Modal System ---
|
| 695 |
+
|
| 696 |
+
function showModal(title, message, onConfirm, showCancel = false, confirmText = "OK", type = "primary") {
|
| 697 |
+
const titleEl = document.getElementById('modalTitle');
|
| 698 |
+
const msgEl = document.getElementById('modalMessage');
|
| 699 |
+
const confirmBtn = document.getElementById('modalConfirmBtn');
|
| 700 |
+
const cancelBtn = document.getElementById('modalCancelBtn');
|
| 701 |
+
|
| 702 |
+
titleEl.textContent = title;
|
| 703 |
+
msgEl.textContent = message;
|
| 704 |
+
|
| 705 |
+
confirmBtn.textContent = confirmText;
|
| 706 |
+
confirmBtn.className = type === 'danger' ? 'btn-danger' : 'btn-primary';
|
| 707 |
+
|
| 708 |
+
cancelBtn.style.display = showCancel ? 'block' : 'none';
|
| 709 |
+
|
| 710 |
+
// Clone buttons to remove old event listeners
|
| 711 |
+
const newConfirm = confirmBtn.cloneNode(true);
|
| 712 |
+
const newCancel = cancelBtn.cloneNode(true);
|
| 713 |
+
confirmBtn.parentNode.replaceChild(newConfirm, confirmBtn);
|
| 714 |
+
cancelBtn.parentNode.replaceChild(newCancel, cancelBtn);
|
| 715 |
+
|
| 716 |
+
newConfirm.addEventListener('click', () => {
|
| 717 |
+
if (onConfirm) onConfirm();
|
| 718 |
+
closeModal();
|
| 719 |
+
});
|
| 720 |
+
|
| 721 |
+
newCancel.addEventListener('click', closeModal);
|
| 722 |
+
|
| 723 |
+
modalOverlay.classList.add('open');
|
| 724 |
+
}
|
| 725 |
+
|
| 726 |
+
function closeModal() {
|
| 727 |
+
modalOverlay.classList.remove('open');
|
| 728 |
+
}
|
| 729 |
+
|
| 730 |
+
function showAlert(title, message, type="primary") {
|
| 731 |
+
showModal(title, message, null, false, "OK", type);
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
function showConfirm(title, message, onConfirm, confirmText="Confirm", type="primary") {
|
| 735 |
+
showModal(title, message, onConfirm, true, confirmText, type);
|
| 736 |
+
}
|
| 737 |
+
|
| 738 |
+
// --- Utilities ---
|
| 739 |
+
function safeForMarkdown(text) { return text ? text.replace(/</g, "<").replace(/>/g, ">") : ""; }
|
| 740 |
+
function escapeHtml(text) {
|
| 741 |
+
if (!text) return "";
|
| 742 |
+
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
// --- Storage (Mantido 'jsonDatasetRender' para compatibilidade) ---
|
| 746 |
+
function saveToStorage() { localStorage.setItem('jsonDatasetRender', JSON.stringify(dataset)); }
|
| 747 |
+
function loadFromStorage() {
|
| 748 |
+
const saved = localStorage.getItem('jsonDatasetRender');
|
| 749 |
+
if (saved) dataset = JSON.parse(saved);
|
| 750 |
+
}
|
| 751 |
+
</script>
|
| 752 |
+
</body>
|
| 753 |
+
</html>
|
fine_tuning_all-126M.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae85fde249d36b982a1fcd5ad9cd183eba99c69888b6a3e288a58775b9cdfe8f
|
| 3 |
+
size 420858041
|
fine_tuning_chat-267K.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
fine_tuning_en-31M.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d866f112eb8c9961993151637f8f8fd99800bdfe58451a8795808b7105ccf370
|
| 3 |
+
size 118127956
|
fine_tuning_es-35M.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7bd13b5dd5f810d53c2050e17778ecccc7c91ca308174940428db82ca1e10bc2
|
| 3 |
+
size 114565052
|
fine_tuning_pt-42M.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bdf259bb9ca9ac0f1c6d9d49dabb3a4ff3b08159167a5afd9a3db13e901a8c4
|
| 3 |
+
size 135001199
|
fine_tuning_sapiens_chat-171K.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
fine_tuning_sapiens_chat-70K.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
fine_tuning_sapiens_technology-360K.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
fine_tuning_webapps-6M.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e24371809a827f2406022327c0b27946c913be3533274cd071322020da4e9b5
|
| 3 |
+
size 17936285
|