marcessz commited on
Commit
9470788
·
verified ·
1 Parent(s): 51446a0

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +567 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mmmstudio
3
- emoji: 🐠
4
- colorFrom: pink
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: mmmstudio
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,567 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Marketing Mix Modeling Studio</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6B73FF 0%, #000DFF 50%, #00D4FF 100%);
12
+ }
13
+ .sidebar {
14
+ transition: all 0.3s ease;
15
+ }
16
+ .model-card:hover {
17
+ transform: translateY(-5px);
18
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
19
+ }
20
+ .dataset-item:hover {
21
+ background-color: rgba(59, 130, 246, 0.1);
22
+ }
23
+ #visualization-container {
24
+ min-height: 400px;
25
+ }
26
+ #data-preview {
27
+ max-height: 400px;
28
+ overflow-y: auto;
29
+ }
30
+ .transform-option:hover {
31
+ background-color: rgba(99, 102, 241, 0.1);
32
+ }
33
+ .tab-active {
34
+ border-bottom: 3px solid #4f46e5;
35
+ color: #4f46e5;
36
+ font-weight: 600;
37
+ }
38
+ </style>
39
+ </head>
40
+ <body class="bg-gray-50 font-sans">
41
+ <div class="flex h-screen overflow-hidden">
42
+ <!-- Sidebar -->
43
+ <div class="sidebar bg-white w-64 border-r border-gray-200 flex flex-col">
44
+ <div class="p-4 flex items-center justify-between border-b border-gray-200">
45
+ <div class="flex items-center space-x-2">
46
+ <div class="w-8 h-8 rounded-full gradient-bg flex items-center justify-center">
47
+ <i class="fas fa-chart-pie text-white"></i>
48
+ </div>
49
+ <h1 class="text-xl font-bold text-gray-800">MMM Studio</h1>
50
+ </div>
51
+ <button id="sidebar-toggle" class="text-gray-500 hover:text-gray-700 md:hidden">
52
+ <i class="fas fa-bars"></i>
53
+ </button>
54
+ </div>
55
+ <div class="flex-1 overflow-y-auto p-4">
56
+ <div class="mb-6">
57
+ <h2 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">Workflow</h2>
58
+ <nav>
59
+ <a href="#" class="flex items-center space-x-3 p-2 rounded-lg bg-blue-50 text-blue-600" id="data-tab">
60
+ <i class="fas fa-database w-5"></i>
61
+ <span>1. Data Preparation</span>
62
+ </a>
63
+ <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="transform-tab">
64
+ <i class="fas fa-sliders-h w-5"></i>
65
+ <span>2. Transformations</span>
66
+ </a>
67
+ <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="model-tab">
68
+ <i class="fas fa-project-diagram w-5"></i>
69
+ <span>3. Model Setup</span>
70
+ </a>
71
+ <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="results-tab">
72
+ <i class="fas fa-chart-line w-5"></i>
73
+ <span>4. Results</span>
74
+ </a>
75
+ </nav>
76
+ </div>
77
+ <div>
78
+ <h2 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">Recent Projects</h2>
79
+ <div class="space-y-1">
80
+ <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100">
81
+ <div class="w-2 h-2 rounded-full bg-green-500"></div>
82
+ <span>Q2 Campaign Analysis</span>
83
+ </a>
84
+ <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100">
85
+ <div class="w-2 h-2 rounded-full bg-blue-500"></div>
86
+ <span>Product Launch MMM</span>
87
+ </a>
88
+ <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100">
89
+ <div class="w-2 h-2 rounded-full bg-yellow-500"></div>
90
+ <span>Seasonal Impact Study</span>
91
+ </a>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <div class="p-4 border-t border-gray-200">
96
+ <div class="flex items-center space-x-3">
97
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full">
98
+ <div>
99
+ <p class="text-sm font-medium text-gray-800">Marketing Analyst</p>
100
+ <p class="text-xs text-gray-500">Last active: 2h ago</p>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+
106
+ <!-- Main Content -->
107
+ <div class="flex-1 overflow-auto">
108
+ <!-- Header -->
109
+ <header class="bg-white border-b border-gray-200 p-4 flex items-center justify-between">
110
+ <h2 class="text-2xl font-bold text-gray-800" id="current-step">Data Preparation</h2>
111
+ <div class="flex items-center space-x-4">
112
+ <button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 flex items-center">
113
+ <i class="fas fa-play mr-2"></i> Run Model
114
+ </button>
115
+ <button class="p-2 text-gray-500 hover:text-gray-700">
116
+ <i class="fas fa-save"></i>
117
+ </button>
118
+ <button class="p-2 text-gray-500 hover:text-gray-700">
119
+ <i class="fas fa-question-circle"></i>
120
+ </button>
121
+ </div>
122
+ </header>
123
+
124
+ <!-- Main Content Area -->
125
+ <main class="p-6">
126
+ <!-- Data Preparation Section -->
127
+ <div id="data-section" class="mb-8">
128
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6">
129
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Upload Dataset</h3>
130
+ <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center">
131
+ <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i>
132
+ <p class="text-gray-600 mb-2">Drag and drop your CSV or Excel file here</p>
133
+ <p class="text-sm text-gray-500 mb-4">or</p>
134
+ <input type="file" id="file-upload" class="hidden" accept=".csv,.xlsx,.xls">
135
+ <label for="file-upload" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 cursor-pointer">
136
+ Browse Files
137
+ </label>
138
+ <p class="text-xs text-gray-500 mt-3">Supports: CSV, XLSX (Max 50MB)</p>
139
+ </div>
140
+ </div>
141
+
142
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
143
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Data Preview</h3>
144
+ <div id="data-preview" class="border border-gray-200 rounded-lg overflow-hidden">
145
+ <div class="bg-gray-100 p-4 text-center text-gray-500">
146
+ <i class="fas fa-table mr-2"></i> No data uploaded yet
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </div>
151
+
152
+ <!-- Transformations Section -->
153
+ <div id="transform-section" class="mb-8 hidden">
154
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6">
155
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Available Transformations</h3>
156
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
157
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
158
+ <div class="flex items-center mb-2">
159
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
160
+ <i class="fas fa-calculator text-indigo-600"></i>
161
+ </div>
162
+ <h4 class="font-medium">Log Transformation</h4>
163
+ </div>
164
+ <p class="text-sm text-gray-600">Apply logarithmic transformation to normalize data</p>
165
+ </div>
166
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
167
+ <div class="flex items-center mb-2">
168
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
169
+ <i class="fas fa-calendar-alt text-indigo-600"></i>
170
+ </div>
171
+ <h4 class="font-medium">Date Aggregation</h4>
172
+ </div>
173
+ <p class="text-sm text-gray-600">Aggregate data by week, month or quarter</p>
174
+ </div>
175
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
176
+ <div class="flex items-center mb-2">
177
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
178
+ <i class="fas fa-percentage text-indigo-600"></i>
179
+ </div>
180
+ <h4 class="font-medium">Normalization</h4>
181
+ </div>
182
+ <p class="text-sm text-gray-600">Scale variables to 0-1 range</p>
183
+ </div>
184
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
185
+ <div class="flex items-center mb-2">
186
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
187
+ <i class="fas fa-wave-square text-indigo-600"></i>
188
+ </div>
189
+ <h4 class="font-medium">Adstock</h4>
190
+ </div>
191
+ <p class="text-sm text-gray-600">Apply adstock effect to media variables</p>
192
+ </div>
193
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
194
+ <div class="flex items-center mb-2">
195
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
196
+ <i class="fas fa-random text-indigo-600"></i>
197
+ </div>
198
+ <h4 class="font-medium">Lag Variables</h4>
199
+ </div>
200
+ <p class="text-sm text-gray-600">Create lagged versions of variables</p>
201
+ </div>
202
+ <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300">
203
+ <div class="flex items-center mb-2">
204
+ <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
205
+ <i class="fas fa-filter text-indigo-600"></i>
206
+ </div>
207
+ <h4 class="font-medium">Outlier Treatment</h4>
208
+ </div>
209
+ <p class="text-sm text-gray-600">Detect and treat outliers</p>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
215
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Applied Transformations</h3>
216
+ <div class="border border-gray-200 rounded-lg p-4">
217
+ <div class="text-center text-gray-500 py-8">
218
+ <i class="fas fa-sliders-h text-2xl mb-2"></i>
219
+ <p>No transformations applied yet</p>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+
225
+ <!-- Model Setup Section -->
226
+ <div id="model-section" class="mb-8 hidden">
227
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
228
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
229
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Configuration</h3>
230
+
231
+ <div class="mb-4">
232
+ <label class="block text-sm font-medium text-gray-700 mb-1">Target Variable</label>
233
+ <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
234
+ <option value="">Select target variable</option>
235
+ <option value="sales">Sales</option>
236
+ <option value="revenue">Revenue</option>
237
+ <option value="conversions">Conversions</option>
238
+ </select>
239
+ </div>
240
+
241
+ <div class="mb-4">
242
+ <label class="block text-sm font-medium text-gray-700 mb-1">Media Variables</label>
243
+ <div class="border border-gray-200 rounded-lg p-2 max-h-40 overflow-y-auto">
244
+ <div class="flex items-center mb-2">
245
+ <input type="checkbox" id="tv" class="mr-2">
246
+ <label for="tv">TV Spend</label>
247
+ </div>
248
+ <div class="flex items-center mb-2">
249
+ <input type="checkbox" id="digital" class="mr-2">
250
+ <label for="digital">Digital Spend</label>
251
+ </div>
252
+ <div class="flex items-center mb-2">
253
+ <input type="checkbox" id="social" class="mr-2">
254
+ <label for="social">Social Media</label>
255
+ </div>
256
+ <div class="flex items-center mb-2">
257
+ <input type="checkbox" id="print" class="mr-2">
258
+ <label for="print">Print Media</label>
259
+ </div>
260
+ <div class="flex items-center">
261
+ <input type="checkbox" id="radio" class="mr-2">
262
+ <label for="radio">Radio</label>
263
+ </div>
264
+ </div>
265
+ </div>
266
+
267
+ <div class="mb-4">
268
+ <label class="block text-sm font-medium text-gray-700 mb-1">Control Variables</label>
269
+ <div class="border border-gray-200 rounded-lg p-2 max-h-40 overflow-y-auto">
270
+ <div class="flex items-center mb-2">
271
+ <input type="checkbox" id="price" class="mr-2">
272
+ <label for="price">Price</label>
273
+ </div>
274
+ <div class="flex items-center mb-2">
275
+ <input type="checkbox" id="promo" class="mr-2">
276
+ <label for="promo">Promotions</label>
277
+ </div>
278
+ <div class="flex items-center mb-2">
279
+ <input type="checkbox" id="season" class="mr-2">
280
+ <label for="season">Seasonality</label>
281
+ </div>
282
+ <div class="flex items-center">
283
+ <input type="checkbox" id="comp" class="mr-2">
284
+ <label for="comp">Competitor Activity</label>
285
+ </div>
286
+ </div>
287
+ </div>
288
+
289
+ <div class="mb-4">
290
+ <label class="block text-sm font-medium text-gray-700 mb-1">Model Type</label>
291
+ <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
292
+ <option value="linear">Linear Regression</option>
293
+ <option value="ridge">Ridge Regression</option>
294
+ <option value="lasso">LASSO Regression</option>
295
+ <option value="bayesian">Bayesian Regression</option>
296
+ </select>
297
+ </div>
298
+ </div>
299
+
300
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
301
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Parameters</h3>
302
+
303
+ <div class="mb-4">
304
+ <label class="block text-sm font-medium text-gray-700 mb-1">Time Range</label>
305
+ <div class="flex space-x-2">
306
+ <input type="date" class="border border-gray-300 rounded-lg px-3 py-2 flex-1">
307
+ <span class="flex items-center">to</span>
308
+ <input type="date" class="border border-gray-300 rounded-lg px-3 py-2 flex-1">
309
+ </div>
310
+ </div>
311
+
312
+ <div class="mb-4">
313
+ <label class="block text-sm font-medium text-gray-700 mb-1">Train/Test Split</label>
314
+ <div class="flex items-center">
315
+ <input type="range" min="50" max="90" value="80" class="w-full mr-3">
316
+ <span class="text-sm font-medium">80%</span>
317
+ </div>
318
+ <p class="text-xs text-gray-500 mt-1">Percentage of data to use for training</p>
319
+ </div>
320
+
321
+ <div class="mb-4">
322
+ <label class="block text-sm font-medium text-gray-700 mb-1">Adstock Parameters</label>
323
+ <div class="space-y-2">
324
+ <div class="flex items-center justify-between">
325
+ <span class="text-sm">TV Carryover</span>
326
+ <input type="number" min="0" max="1" step="0.1" value="0.5" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right">
327
+ </div>
328
+ <div class="flex items-center justify-between">
329
+ <span class="text-sm">Digital Carryover</span>
330
+ <input type="number" min="0" max="1" step="0.1" value="0.3" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right">
331
+ </div>
332
+ <div class="flex items-center justify-between">
333
+ <span class="text-sm">Social Carryover</span>
334
+ <input type="number" min="0" max="1" step="0.1" value="0.2" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right">
335
+ </div>
336
+ </div>
337
+ </div>
338
+
339
+ <div class="mb-4">
340
+ <label class="block text-sm font-medium text-gray-700 mb-1">Saturation Curve</label>
341
+ <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500">
342
+ <option value="hill">Hill Function</option>
343
+ <option value="log">Logarithmic</option>
344
+ <option value="exp">Exponential</option>
345
+ </select>
346
+ </div>
347
+ </div>
348
+ </div>
349
+ </div>
350
+
351
+ <!-- Results Section -->
352
+ <div id="results-section" class="hidden">
353
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6">
354
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Performance</h3>
355
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
356
+ <div class="bg-gray-50 rounded-lg p-4 border border-gray-200">
357
+ <p class="text-sm font-medium text-gray-500 mb-1">R-squared</p>
358
+ <p class="text-2xl font-bold text-gray-800">0.87</p>
359
+ <p class="text-xs text-green-500">Good fit</p>
360
+ </div>
361
+ <div class="bg-gray-50 rounded-lg p-4 border border-gray-200">
362
+ <p class="text-sm font-medium text-gray-500 mb-1">MAPE</p>
363
+ <p class="text-2xl font-bold text-gray-800">12.5%</p>
364
+ <p class="text-xs text-yellow-500">Moderate error</p>
365
+ </div>
366
+ <div class="bg-gray-50 rounded-lg p-4 border border-gray-200">
367
+ <p class="text-sm font-medium text-gray-500 mb-1">RMSE</p>
368
+ <p class="text-2xl font-bold text-gray-800">1,245</p>
369
+ <p class="text-xs text-green-500">Good precision</p>
370
+ </div>
371
+ </div>
372
+
373
+ <div class="border border-gray-200 rounded-lg p-4">
374
+ <div class="flex justify-between items-center mb-4">
375
+ <h4 class="font-medium">Actual vs Predicted</h4>
376
+ <div class="flex space-x-2">
377
+ <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">Weekly</button>
378
+ <button class="px-3 py-1 bg-indigo-600 text-white rounded-lg text-sm">Monthly</button>
379
+ <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">Quarterly</button>
380
+ </div>
381
+ </div>
382
+ <div id="visualization-container" class="bg-gray-50 rounded-lg p-4 h-64 flex items-center justify-center">
383
+ <p class="text-gray-500">Run the model to see visualization</p>
384
+ </div>
385
+ </div>
386
+ </div>
387
+
388
+ <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
389
+ <h3 class="text-lg font-semibold text-gray-800 mb-4">ROI Analysis</h3>
390
+ <div class="overflow-x-auto">
391
+ <table class="min-w-full divide-y divide-gray-200">
392
+ <thead class="bg-gray-50">
393
+ <tr>
394
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Channel</th>
395
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Spend</th>
396
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Contribution</th>
397
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ROI</th>
398
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Efficiency</th>
399
+ </tr>
400
+ </thead>
401
+ <tbody class="bg-white divide-y divide-gray-200">
402
+ <tr>
403
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">TV</td>
404
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$1,250,000</td>
405
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32%</td>
406
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">2.8</td>
407
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">High</td>
408
+ </tr>
409
+ <tr>
410
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Digital</td>
411
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$850,000</td>
412
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">28%</td>
413
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">3.2</td>
414
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Very High</td>
415
+ </tr>
416
+ <tr>
417
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Social Media</td>
418
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$320,000</td>
419
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">18%</td>
420
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-500">1.9</td>
421
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Medium</td>
422
+ </tr>
423
+ <tr>
424
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Print</td>
425
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$180,000</td>
426
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12%</td>
427
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-red-500">0.8</td>
428
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Low</td>
429
+ </tr>
430
+ <tr>
431
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Radio</td>
432
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$150,000</td>
433
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10%</td>
434
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-500">1.2</td>
435
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Medium</td>
436
+ </tr>
437
+ </tbody>
438
+ </table>
439
+ </div>
440
+ </div>
441
+ </div>
442
+ </main>
443
+ </div>
444
+ </div>
445
+
446
+ <script>
447
+ // Tab navigation
448
+ document.getElementById('data-tab').addEventListener('click', function(e) {
449
+ e.preventDefault();
450
+ showSection('data-section');
451
+ document.getElementById('current-step').textContent = 'Data Preparation';
452
+ setActiveTab('data-tab');
453
+ });
454
+
455
+ document.getElementById('transform-tab').addEventListener('click', function(e) {
456
+ e.preventDefault();
457
+ showSection('transform-section');
458
+ document.getElementById('current-step').textContent = 'Data Transformations';
459
+ setActiveTab('transform-tab');
460
+ });
461
+
462
+ document.getElementById('model-tab').addEventListener('click', function(e) {
463
+ e.preventDefault();
464
+ showSection('model-section');
465
+ document.getElementById('current-step').textContent = 'Model Setup';
466
+ setActiveTab('model-tab');
467
+ });
468
+
469
+ document.getElementById('results-tab').addEventListener('click', function(e) {
470
+ e.preventDefault();
471
+ showSection('results-section');
472
+ document.getElementById('current-step').textContent = 'Model Results';
473
+ setActiveTab('results-tab');
474
+ });
475
+
476
+ function showSection(sectionId) {
477
+ // Hide all sections
478
+ document.getElementById('data-section').classList.add('hidden');
479
+ document.getElementById('transform-section').classList.add('hidden');
480
+ document.getElementById('model-section').classList.add('hidden');
481
+ document.getElementById('results-section').classList.add('hidden');
482
+
483
+ // Show selected section
484
+ document.getElementById(sectionId).classList.remove('hidden');
485
+ }
486
+
487
+ function setActiveTab(tabId) {
488
+ // Remove active class from all tabs
489
+ document.getElementById('data-tab').classList.remove('bg-blue-50', 'text-blue-600');
490
+ document.getElementById('transform-tab').classList.remove('bg-blue-50', 'text-blue-600');
491
+ document.getElementById('model-tab').classList.remove('bg-blue-50', 'text-blue-600');
492
+ document.getElementById('results-tab').classList.remove('bg-blue-50', 'text-blue-600');
493
+
494
+ // Add active class to selected tab
495
+ document.getElementById(tabId).classList.add('bg-blue-50', 'text-blue-600');
496
+ }
497
+
498
+ // File upload simulation
499
+ document.getElementById('file-upload').addEventListener('change', function(e) {
500
+ const file = e.target.files[0];
501
+ if (file) {
502
+ // Simulate processing
503
+ setTimeout(() => {
504
+ // Create a simple table preview
505
+ const previewHTML = `
506
+ <table class="min-w-full divide-y divide-gray-200">
507
+ <thead class="bg-gray-50">
508
+ <tr>
509
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
510
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Sales</th>
511
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">TV Spend</th>
512
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Digital Spend</th>
513
+ </tr>
514
+ </thead>
515
+ <tbody class="bg-white divide-y divide-gray-200">
516
+ <tr>
517
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-01</td>
518
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">125,000</td>
519
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">50,000</td>
520
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25,000</td>
521
+ </tr>
522
+ <tr>
523
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-08</td>
524
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">135,000</td>
525
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">55,000</td>
526
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">28,000</td>
527
+ </tr>
528
+ <tr>
529
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-15</td>
530
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">145,000</td>
531
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">60,000</td>
532
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">30,000</td>
533
+ </tr>
534
+ <tr>
535
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-22</td>
536
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">155,000</td>
537
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">65,000</td>
538
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32,000</td>
539
+ </tr>
540
+ <tr>
541
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-29</td>
542
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">165,000</td>
543
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">70,000</td>
544
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">35,000</td>
545
+ </tr>
546
+ </tbody>
547
+ </table>
548
+ `;
549
+
550
+ document.getElementById('data-preview').innerHTML = previewHTML;
551
+
552
+ // Enable the next steps
553
+ document.getElementById('transform-tab').classList.remove('text-gray-700');
554
+ document.getElementById('transform-tab').classList.add('text-blue-600');
555
+ }, 1000);
556
+ }
557
+ });
558
+
559
+ // Sidebar toggle for mobile
560
+ document.getElementById('sidebar-toggle').addEventListener('click', function() {
561
+ const sidebar = document.querySelector('.sidebar');
562
+ sidebar.classList.toggle('hidden');
563
+ sidebar.classList.toggle('block');
564
+ });
565
+ </script>
566
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=marcessz/mmmstudio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
567
+ </html>