ashwath-vaithina-ibm commited on
Commit
630cf5e
·
verified ·
1 Parent(s): 0499186

Update static/demo/index.html

Browse files
Files changed (1) hide show
  1. static/demo/index.html +2 -20
static/demo/index.html CHANGED
@@ -6,6 +6,8 @@
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>Responsible Prompting – Multi‐Turn Chat + Graph</title>
8
 
 
 
9
  <!-- Carbon CSS (for tabs and tags) -->
10
  <link rel="stylesheet" href="https://unpkg.com/carbon-components/css/carbon-components.min.css" />
11
 
@@ -24,7 +26,6 @@
24
  flex-direction: column;
25
  }
26
 
27
- /* Container for the header (title + tabs) */
28
  .header-container {
29
  background: white;
30
  padding: 1rem;
@@ -238,14 +239,8 @@
238
  </ol>
239
  </div>
240
 
241
- <!-- ===== Tab Content: Chat or Graph ===== -->
242
  <div class="tab-content">
243
- <!-- Chat Content -->
244
  <div id="chat-content">
245
- <!-- Intro paragraph about responsible prompting -->
246
-
247
-
248
- <!-- Chat container (messages appear here) -->
249
  <div id="chat" class="chat-container"></div>
250
 
251
  <!-- Input area -->
@@ -261,20 +256,13 @@
261
  </div>
262
  </div>
263
 
264
- <!-- Graph Content -->
265
  <div id="graph-content">
266
  <div id="graph"></div>
267
  </div>
268
  </div>
269
 
270
- <!-- Dependencies -->
271
- <script type="text/javascript" src="static/demo/js/d3.v7.min.js"></script>
272
- <script type="text/javascript" src="static/demo/js/jquery-3.7.1.min.js"></script>
273
 
274
  <script>
275
- // =============================
276
- // 1. State & Dimensions for D3
277
- // =============================
278
  let lastRecommendations = null; // stores latest /recommend response
279
 
280
  const width = 600;
@@ -560,9 +548,6 @@
560
  // Initially show “no data” message
561
  renderGraph(null);
562
 
563
- // =============================
564
- // 2. Multi‐Turn Chat + Recommendation Logic
565
- // =============================
566
  const conversation = []; // stores { role, content, recs? }
567
  let currentRecs = [];
568
  let debounceId = null;
@@ -800,9 +785,6 @@
800
  }
801
  });
802
 
803
- // =============================
804
- // 3. Tab Switching (Chat <-> Graph)
805
- // =============================
806
  $("#tab-chat").on("click", function () {
807
  $(this).addClass("bx--tabs__nav-item--selected");
808
  $("#tab-graph").removeClass("bx--tabs__nav-item--selected");
 
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
  <title>Responsible Prompting – Multi‐Turn Chat + Graph</title>
8
 
9
+ <script type="text/javascript" src="static/demo/js/d3.v7.min.js"></script>
10
+ <script type="text/javascript" src="static/demo/js/jquery-3.7.1.min.js"></script>
11
  <!-- Carbon CSS (for tabs and tags) -->
12
  <link rel="stylesheet" href="https://unpkg.com/carbon-components/css/carbon-components.min.css" />
13
 
 
26
  flex-direction: column;
27
  }
28
 
 
29
  .header-container {
30
  background: white;
31
  padding: 1rem;
 
239
  </ol>
240
  </div>
241
 
 
242
  <div class="tab-content">
 
243
  <div id="chat-content">
 
 
 
 
244
  <div id="chat" class="chat-container"></div>
245
 
246
  <!-- Input area -->
 
256
  </div>
257
  </div>
258
 
 
259
  <div id="graph-content">
260
  <div id="graph"></div>
261
  </div>
262
  </div>
263
 
 
 
 
264
 
265
  <script>
 
 
 
266
  let lastRecommendations = null; // stores latest /recommend response
267
 
268
  const width = 600;
 
548
  // Initially show “no data” message
549
  renderGraph(null);
550
 
 
 
 
551
  const conversation = []; // stores { role, content, recs? }
552
  let currentRecs = [];
553
  let debounceId = null;
 
785
  }
786
  });
787
 
 
 
 
788
  $("#tab-chat").on("click", function () {
789
  $(this).addClass("bx--tabs__nav-item--selected");
790
  $("#tab-graph").removeClass("bx--tabs__nav-item--selected");