Spaces:
Running
Running
Upload 15 files
Browse files- digital.human.video.js +22 -32
- finalwork4.html +701 -0
- insights.css +51 -0
- insights.js +25 -0
- podcast.css +51 -0
digital.human.video.js
CHANGED
|
@@ -647,21 +647,24 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
|
| 655 |
-
|
| 656 |
// ------------------ Additions Start Here ------------------
|
| 657 |
|
| 658 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 659 |
function sendImageToAPI(imageB64, onResult, onError) {
|
| 660 |
-
const
|
| 661 |
-
const
|
|
|
|
|
|
|
| 662 |
|
| 663 |
const headers = {
|
| 664 |
-
"Authorization": "Bearer nvapi-
|
| 665 |
"Accept": "application/json",
|
| 666 |
"Content-Type": "application/json"
|
| 667 |
};
|
|
@@ -676,7 +679,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 676 |
"messages": [
|
| 677 |
{
|
| 678 |
"role": "user",
|
| 679 |
-
"content": `Describe the image. <img src="data:image/png;base64,${imageB64}" />`
|
| 680 |
}
|
| 681 |
],
|
| 682 |
"max_tokens": 512,
|
|
@@ -702,7 +705,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 702 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 703 |
|
| 704 |
const userMessage = {
|
| 705 |
-
content: "
|
| 706 |
role: "user"
|
| 707 |
};
|
| 708 |
videoAppendMessage(userMessage);
|
|
@@ -714,7 +717,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 714 |
};
|
| 715 |
videoAppendMessage(assistantMessage);
|
| 716 |
}, function(error) {
|
| 717 |
-
alert("Error: " + error);
|
| 718 |
});
|
| 719 |
});
|
| 720 |
|
|
@@ -731,7 +734,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 731 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 732 |
|
| 733 |
const userMessage = {
|
| 734 |
-
content: "
|
| 735 |
role: "user"
|
| 736 |
};
|
| 737 |
videoAppendMessage(userMessage);
|
|
@@ -743,7 +746,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 743 |
};
|
| 744 |
videoAppendMessage(assistantMessage);
|
| 745 |
}, function(error) {
|
| 746 |
-
alert("Error: " + error);
|
| 747 |
});
|
| 748 |
});
|
| 749 |
|
|
@@ -754,7 +757,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 754 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 755 |
|
| 756 |
const userMessage = {
|
| 757 |
-
content: "
|
| 758 |
role: "user"
|
| 759 |
};
|
| 760 |
videoAppendMessage(userMessage);
|
|
@@ -766,24 +769,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 766 |
};
|
| 767 |
videoAppendMessage(assistantMessage);
|
| 768 |
}, function(error) {
|
| 769 |
-
alert("Error: " + error);
|
| 770 |
});
|
| 771 |
});
|
| 772 |
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
// Tab Switching Functionality
|
| 788 |
const tabButtons = document.querySelectorAll('.image-tabs .tab-button');
|
| 789 |
const tabContents = document.querySelectorAll('.video-image-section .tab-content');
|
|
@@ -797,9 +786,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
| 797 |
|
| 798 |
// Hide all tab contents
|
| 799 |
tabContents.forEach(content => content.classList.add('hidden'));
|
|
|
|
| 800 |
// Show the selected tab content
|
| 801 |
const selectedTab = button.getAttribute('data-tab');
|
| 802 |
-
document.querySelector(`.video-image-section .${selectedTab}-tab`).classList.remove(
|
| 803 |
|
| 804 |
// Initialize functionalities when their respective tabs are activated
|
| 805 |
if (selectedTab === 'webcam') {
|
|
|
|
| 647 |
|
| 648 |
|
| 649 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 650 |
// ------------------ Additions Start Here ------------------
|
| 651 |
|
| 652 |
+
// ===== Modified: Send Image to API via CORS Anywhere =====
|
| 653 |
+
|
| 654 |
+
/**
|
| 655 |
+
* Sends the base64-encoded image to the NVIDIA API through the CORS Anywhere proxy.
|
| 656 |
+
* @param {string} imageB64 - The base64-encoded image string.
|
| 657 |
+
* @param {function} onResult - Callback function to handle successful responses.
|
| 658 |
+
* @param {function} onError - Callback function to handle errors.
|
| 659 |
+
*/
|
| 660 |
function sendImageToAPI(imageB64, onResult, onError) {
|
| 661 |
+
const proxyUrl = 'https://cors-anywhere.herokuapp.com/';
|
| 662 |
+
const targetUrl = 'https://integrate.api.nvidia.com/v1/chat/completions';
|
| 663 |
+
const invokeUrl = proxyUrl + targetUrl;
|
| 664 |
+
const stream = false; // Streaming not supported via proxy
|
| 665 |
|
| 666 |
const headers = {
|
| 667 |
+
"Authorization": "Bearer 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",
|
| 668 |
"Accept": "application/json",
|
| 669 |
"Content-Type": "application/json"
|
| 670 |
};
|
|
|
|
| 679 |
"messages": [
|
| 680 |
{
|
| 681 |
"role": "user",
|
| 682 |
+
"content": `Describe the image mathematically and solve it. <img src="data:image/png;base64,${imageB64}" />`
|
| 683 |
}
|
| 684 |
],
|
| 685 |
"max_tokens": 512,
|
|
|
|
| 705 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 706 |
|
| 707 |
const userMessage = {
|
| 708 |
+
content: "Describe the image mathematically and solve it.",
|
| 709 |
role: "user"
|
| 710 |
};
|
| 711 |
videoAppendMessage(userMessage);
|
|
|
|
| 717 |
};
|
| 718 |
videoAppendMessage(assistantMessage);
|
| 719 |
}, function(error) {
|
| 720 |
+
alert("Error: " + (error.response?.data?.error || error.message));
|
| 721 |
});
|
| 722 |
});
|
| 723 |
|
|
|
|
| 734 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 735 |
|
| 736 |
const userMessage = {
|
| 737 |
+
content: "Describe the image mathematically and solve it.",
|
| 738 |
role: "user"
|
| 739 |
};
|
| 740 |
videoAppendMessage(userMessage);
|
|
|
|
| 746 |
};
|
| 747 |
videoAppendMessage(assistantMessage);
|
| 748 |
}, function(error) {
|
| 749 |
+
alert("Error: " + (error.response?.data?.error || error.message));
|
| 750 |
});
|
| 751 |
});
|
| 752 |
|
|
|
|
| 757 |
const imageB64 = imageDataURL.replace(/^data:image\/(png|jpg|jpeg);base64,/, "");
|
| 758 |
|
| 759 |
const userMessage = {
|
| 760 |
+
content: "Describe the image and solve it.",
|
| 761 |
role: "user"
|
| 762 |
};
|
| 763 |
videoAppendMessage(userMessage);
|
|
|
|
| 769 |
};
|
| 770 |
videoAppendMessage(assistantMessage);
|
| 771 |
}, function(error) {
|
| 772 |
+
alert("Error: " + (error.response?.data?.error || error.message));
|
| 773 |
});
|
| 774 |
});
|
| 775 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 776 |
// Tab Switching Functionality
|
| 777 |
const tabButtons = document.querySelectorAll('.image-tabs .tab-button');
|
| 778 |
const tabContents = document.querySelectorAll('.video-image-section .tab-content');
|
|
|
|
| 786 |
|
| 787 |
// Hide all tab contents
|
| 788 |
tabContents.forEach(content => content.classList.add('hidden'));
|
| 789 |
+
|
| 790 |
// Show the selected tab content
|
| 791 |
const selectedTab = button.getAttribute('data-tab');
|
| 792 |
+
document.querySelector(`.video-image-section .${selectedTab}-tab`).classList.remove("hidden");
|
| 793 |
|
| 794 |
//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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Aged Guru</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<!-- Google Fonts for better typography -->
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Roboto:wght@400;500&display=swap" rel="stylesheet">
|
| 9 |
+
<!-- Include necessary CSS styles -->
|
| 10 |
+
<link rel="stylesheet" href="base.css">
|
| 11 |
+
<link rel="stylesheet" href="coder.css">
|
| 12 |
+
<link rel="stylesheet" href="digital.human.video.css">
|
| 13 |
+
<link rel="stylesheet" href="digital.human.audio.css">
|
| 14 |
+
<link rel="stylesheet" href="advanced.math.css">
|
| 15 |
+
<link rel="stylesheet" href="interdisciplinary.css"> <!-- New CSS for Interdisciplinary -->
|
| 16 |
+
<link rel="stylesheet" href="podcast.css">
|
| 17 |
+
<link rel="stylesheet" href="insights.css">
|
| 18 |
+
</head>
|
| 19 |
+
<body>
|
| 20 |
+
|
| 21 |
+
<!-- Sidebar -->
|
| 22 |
+
<div class="sidebar">
|
| 23 |
+
<h2>AGED GURU</h2>
|
| 24 |
+
<a href="#" class="active" data-content="voice">Digital Human Voice</a>
|
| 25 |
+
<a href="#" data-content="video">Digital Human Video</a>
|
| 26 |
+
<a href="#" data-content="interdisciplinary">Interdisciplinary Studies Assistant</a>
|
| 27 |
+
<a href="#" data-content="coder">Young Coder</a>
|
| 28 |
+
<a href="#" data-content="advanced-math">Advanced Mathematics & Problem Solving</a>
|
| 29 |
+
<a href="#" data-content="podcast">Podcast</a>
|
| 30 |
+
<a href="#" data-content="insights">Insights</a>
|
| 31 |
+
<a href="#" data-content="knowledge-base">Knowledge Base</a>
|
| 32 |
+
<a href="#" data-content="digital-twin">Digital Twin</a>
|
| 33 |
+
<a href="#" data-content="3d-explorer">3D Explorer</a>
|
| 34 |
+
</div>
|
| 35 |
+
|
| 36 |
+
<!-- Main Content -->
|
| 37 |
+
<div class="main-content" id="main-content">
|
| 38 |
+
<div class="header">
|
| 39 |
+
<h1>5-MIN SCIENTIST PORTAL</h1>
|
| 40 |
+
<!-- You can add user profile or settings here -->
|
| 41 |
+
</div>
|
| 42 |
+
<!-- Content will be loaded here -->
|
| 43 |
+
<div id="content-area">
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
<!-- -----------------Digital Human Voice Content Starts---------------- -->
|
| 47 |
+
<div id="voice" class="content-section">
|
| 48 |
+
<div class="card voice-card">
|
| 49 |
+
<!-- Digital Human Voice Layout -->
|
| 50 |
+
<div class="voice-options">
|
| 51 |
+
<!-- Model Selection Section -->
|
| 52 |
+
<div id="voice-model-selection-container" class="option-section">
|
| 53 |
+
<label for="voice-model-selection">Select Model:</label>
|
| 54 |
+
<select id="voice-model-selection"></select>
|
| 55 |
+
<button id="voice-download" disabled>Initialize Model</button>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<!-- Voice Selection Section -->
|
| 59 |
+
<div id="voice-tool-selection-container" class="option-section">
|
| 60 |
+
<label for="voice-tools">Select Voice:</label>
|
| 61 |
+
<select id="voice-tools"></select>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<!-- Speech Controls Section -->
|
| 65 |
+
<div id="voice-speech-controls" class="option-section">
|
| 66 |
+
<label for="voice-speech-rate">Speech Rate:</label>
|
| 67 |
+
<input type="range" id="voice-speech-rate" min="0.5" max="2" step="0.1" value="1" disabled>
|
| 68 |
+
|
| 69 |
+
<label for="voice-speech-pitch">Speech Pitch:</label>
|
| 70 |
+
<input type="range" id="voice-speech-pitch" min="0" max="2" step="0.1" value="1" disabled>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<!-- Logs Section -->
|
| 74 |
+
<div id="voice-logs-container" class="option-section">
|
| 75 |
+
<h3>Logs</h3>
|
| 76 |
+
<div id="voice-logs">
|
| 77 |
+
<!-- Logs will appear here -->
|
| 78 |
+
</div>
|
| 79 |
+
<button id="voice-clear-logs">Clear Logs</button>
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
<div class="chat-window">
|
| 84 |
+
<!-- Chat Box Section -->
|
| 85 |
+
<div id="voice-chat-container">
|
| 86 |
+
<div id="voice-chat-box">
|
| 87 |
+
<!-- Chat messages will appear here -->
|
| 88 |
+
</div>
|
| 89 |
+
|
| 90 |
+
<!-- Chat Stats -->
|
| 91 |
+
<div id="voice-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 92 |
+
|
| 93 |
+
<!-- Chat Input Section -->
|
| 94 |
+
<div id="voice-text-input-container">
|
| 95 |
+
<input type="text" id="voice-text-input" placeholder="Type your message here..." disabled>
|
| 96 |
+
<button id="voice-submit-button" disabled>Send</button>
|
| 97 |
+
</div>
|
| 98 |
+
|
| 99 |
+
<!-- Microphone Controls -->
|
| 100 |
+
<div id="voice-mic-container">
|
| 101 |
+
<button id="voice-start_button" aria-label="Start Voice Input" disabled>
|
| 102 |
+
<!-- Mic Icon SVG -->
|
| 103 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 104 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 105 |
+
</svg>
|
| 106 |
+
</button>
|
| 107 |
+
<button id="voice-stop_button" aria-label="Stop Speech" disabled>
|
| 108 |
+
<!-- Stop Icon SVG -->
|
| 109 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 110 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 111 |
+
</svg>
|
| 112 |
+
</button>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<!-- Loading Spinner -->
|
| 117 |
+
<div id="voice-loading-spinner" class="hidden">
|
| 118 |
+
<div class="spinner"></div>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<!-- Configuration Info -->
|
| 122 |
+
<div id="voice-configuration" class="hidden">
|
| 123 |
+
<p>Model Initialized: <span id="voice-selected-model">N/A</span></p>
|
| 124 |
+
</div>
|
| 125 |
+
</div>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
<!-- -----------------Digital Human Voice Content Ends---------------- -->
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
<!-- --------------------Digital Human Mentor Video Content Starts---------------- -->
|
| 135 |
+
<div id="video" class="content-section hidden">
|
| 136 |
+
<div class="card video-card">
|
| 137 |
+
<!-- Video Options -->
|
| 138 |
+
<div class="video-options">
|
| 139 |
+
<!-- Model Selection Section -->
|
| 140 |
+
<div id="video-model-selection-container" class="option-section">
|
| 141 |
+
<label for="video-model-selection">Select Model:</label>
|
| 142 |
+
<select id="video-model-selection"></select>
|
| 143 |
+
<button id="video-download" disabled>Initialize Model</button>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<!-- Voice Selection Section -->
|
| 147 |
+
<div id="video-tool-selection-container" class="option-section">
|
| 148 |
+
<label for="video-tools">Select Voice:</label>
|
| 149 |
+
<select id="video-tools"></select>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<!-- Speech Controls Section -->
|
| 153 |
+
<div id="video-speech-controls" class="option-section">
|
| 154 |
+
<label for="video-speech-rate">Speech Rate:</label>
|
| 155 |
+
<input type="range" id="video-speech-rate" min="0.5" max="2" step="0.1" value="1" disabled>
|
| 156 |
+
|
| 157 |
+
<label for="video-speech-pitch">Speech Pitch:</label>
|
| 158 |
+
<input type="range" id="video-speech-pitch" min="0" max="2" step="0.1" value="1" disabled>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<!-- Logs Section -->
|
| 162 |
+
<div id="video-logs-container" class="option-section">
|
| 163 |
+
<h3>Logs</h3>
|
| 164 |
+
<div id="video-logs">
|
| 165 |
+
<!-- Logs will appear here -->
|
| 166 |
+
</div>
|
| 167 |
+
<button id="video-clear-logs">Clear Logs</button>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<!-- New: Wrapper for Chat Window and Image Upload Section -->
|
| 172 |
+
<div class="video-main">
|
| 173 |
+
<!-- Chat Window Section -->
|
| 174 |
+
<div class="chat-window">
|
| 175 |
+
<!-- Chat Box Section -->
|
| 176 |
+
<div id="video-chat-container">
|
| 177 |
+
<div id="video-chat-box">
|
| 178 |
+
<!-- Chat messages will appear here -->
|
| 179 |
+
</div>
|
| 180 |
+
|
| 181 |
+
<!-- Chat Stats -->
|
| 182 |
+
<div id="video-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 183 |
+
|
| 184 |
+
<!-- Chat Input Section -->
|
| 185 |
+
<div id="video-text-input-container">
|
| 186 |
+
<input type="text" id="video-text-input" placeholder="Type your message here..." disabled>
|
| 187 |
+
<button id="video-submit-button" disabled>Send</button>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<!-- Microphone Controls -->
|
| 191 |
+
<div id="video-mic-container">
|
| 192 |
+
<button id="video-start_button" aria-label="Start Voice Input" disabled>
|
| 193 |
+
<!-- Mic Icon SVG -->
|
| 194 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 195 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 196 |
+
</svg>
|
| 197 |
+
</button>
|
| 198 |
+
<button id="video-stop_button" aria-label="Stop Speech" disabled>
|
| 199 |
+
<!-- Stop Icon SVG -->
|
| 200 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 201 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 202 |
+
</svg>
|
| 203 |
+
</button>
|
| 204 |
+
</div>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<!-- Loading Spinner -->
|
| 208 |
+
<div id="video-loading-spinner" class="hidden">
|
| 209 |
+
<div class="spinner"></div>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<!-- Configuration Info -->
|
| 213 |
+
<div id="video-configuration" class="hidden">
|
| 214 |
+
<p>Model Initialized: <span id="video-selected-model">N/A</span></p>
|
| 215 |
+
</div>
|
| 216 |
+
</div>
|
| 217 |
+
|
| 218 |
+
<!-- Image Upload and Canvas Section -->
|
| 219 |
+
<div class="video-image-section">
|
| 220 |
+
<!-- Tab Navigation -->
|
| 221 |
+
<div class="image-tabs">
|
| 222 |
+
<button class="tab-button active" data-tab="upload">Upload Image</button>
|
| 223 |
+
<button class="tab-button" data-tab="webcam">Webcam</button>
|
| 224 |
+
<button class="tab-button" data-tab="draw">Draw</button>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<!-- Tab Contents -->
|
| 228 |
+
<div class="tab-content upload-tab">
|
| 229 |
+
<h3>Upload and Analyze Image</h3>
|
| 230 |
+
<input type="file" id="video-image-upload" accept="image/*" />
|
| 231 |
+
<canvas id="video-image-canvas"></canvas>
|
| 232 |
+
<button id="analyze-button">Analyze</button>
|
| 233 |
+
</div>
|
| 234 |
+
|
| 235 |
+
<div class="tab-content webcam-tab hidden">
|
| 236 |
+
<h3>Webcam Capture</h3>
|
| 237 |
+
<video id="webcam-video" autoplay playsinline></video>
|
| 238 |
+
<button id="capture-webcam-button">Explain Image</button>
|
| 239 |
+
</div>
|
| 240 |
+
|
| 241 |
+
<div class="tab-content draw-tab hidden">
|
| 242 |
+
<h3>Draw on Canvas</h3>
|
| 243 |
+
<canvas id="draw-canvas"></canvas>
|
| 244 |
+
<div class="draw-controls">
|
| 245 |
+
<button id="clear-draw-button">Clear Drawing</button>
|
| 246 |
+
<label for="draw-color">Color:</label>
|
| 247 |
+
<input type="color" id="draw-color" value="#000000">
|
| 248 |
+
<label for="draw-size">Size:</label>
|
| 249 |
+
<input type="range" id="draw-size" min="1" max="10" value="2">
|
| 250 |
+
<button id="discuss-button">Discuss</button>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
</div>
|
| 258 |
+
</div>
|
| 259 |
+
</div>
|
| 260 |
+
<!-- --------------------Digital Human Mentor Video Content Ends----------------- -->
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
<!-- --------------------Coder Content Starts------------------------------------- -->
|
| 267 |
+
<div id="coder" class="content-section hidden">
|
| 268 |
+
<div class="card coder-card">
|
| 269 |
+
<!-- Wrapper for Top Options -->
|
| 270 |
+
<div class="coder-options">
|
| 271 |
+
<!-- Model Selection Section -->
|
| 272 |
+
<div id="coder-model-selection-container" class="option-section">
|
| 273 |
+
<label for="coder-model-selection">Select Model:</label>
|
| 274 |
+
<div class="option-control-group">
|
| 275 |
+
<select id="coder-model-selection"></select>
|
| 276 |
+
<button id="coder-download" disabled>Initialize Model</button>
|
| 277 |
+
</div>
|
| 278 |
+
</div>
|
| 279 |
+
|
| 280 |
+
<!-- Voice Selection Section -->
|
| 281 |
+
<div id="coder-tool-selection-container" class="option-section">
|
| 282 |
+
<label for="coder-tools">Select Voice:</label>
|
| 283 |
+
<select id="coder-tools"></select>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<!-- Speech Controls Section -->
|
| 287 |
+
<div id="coder-speech-controls" class="option-section">
|
| 288 |
+
<label for="coder-speech-rate">Speech Rate:</label>
|
| 289 |
+
<input type="range" id="coder-speech-rate" min="0.5" max="2" step="0.1" value="1" disabled>
|
| 290 |
+
|
| 291 |
+
<label for="coder-speech-pitch">Speech Pitch:</label>
|
| 292 |
+
<input type="range" id="coder-speech-pitch" min="0" max="2" step="0.1" value="1" disabled>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<!-- Logs Section -->
|
| 296 |
+
<div id="coder-logs-container" class="option-section">
|
| 297 |
+
<h3>Logs</h3>
|
| 298 |
+
<div id="coder-logs">
|
| 299 |
+
<!-- Logs will appear here -->
|
| 300 |
+
</div>
|
| 301 |
+
<button id="coder-clear-logs">Clear Logs</button>
|
| 302 |
+
</div>
|
| 303 |
+
</div>
|
| 304 |
+
<!-- End of Top Options Wrapper -->
|
| 305 |
+
|
| 306 |
+
<!-- Wrapper for Chat and Python Interpreter -->
|
| 307 |
+
<div class="coder-main" style="display: flex; flex-direction: row; gap: 20px;">
|
| 308 |
+
<!-- Chat Window Section -->
|
| 309 |
+
<div class="chat-window" style="flex: 2;">
|
| 310 |
+
<!-- Chat Box Section -->
|
| 311 |
+
<div id="coder-chat-container">
|
| 312 |
+
<div id="coder-chat-box">
|
| 313 |
+
<!-- Chat messages will appear here -->
|
| 314 |
+
</div>
|
| 315 |
+
|
| 316 |
+
<!-- Chat Stats -->
|
| 317 |
+
<div id="coder-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 318 |
+
|
| 319 |
+
<!-- Chat Input Section -->
|
| 320 |
+
<div id="coder-text-input-container">
|
| 321 |
+
<input type="text" id="coder-text-input" placeholder="Type your message here..." disabled>
|
| 322 |
+
<button id="coder-submit-button" disabled>Send</button>
|
| 323 |
+
</div>
|
| 324 |
+
|
| 325 |
+
<!-- Microphone Controls -->
|
| 326 |
+
<div id="coder-mic-container">
|
| 327 |
+
<button id="coder-start_button" aria-label="Start Voice Input" disabled>
|
| 328 |
+
<!-- Mic Icon SVG -->
|
| 329 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 330 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 331 |
+
</svg>
|
| 332 |
+
</button>
|
| 333 |
+
<button id="coder-stop_button" aria-label="Stop Speech" disabled>
|
| 334 |
+
<!-- Stop Icon SVG -->
|
| 335 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 336 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 337 |
+
</svg>
|
| 338 |
+
</button>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
|
| 342 |
+
<!-- Loading Spinner -->
|
| 343 |
+
<div id="coder-loading-spinner" class="hidden">
|
| 344 |
+
<div class="spinner"></div>
|
| 345 |
+
</div>
|
| 346 |
+
|
| 347 |
+
<!-- Configuration Info -->
|
| 348 |
+
<div id="coder-configuration" class="hidden">
|
| 349 |
+
<p>Model Initialized: <span id="coder-selected-model">N/A</span></p>
|
| 350 |
+
</div>
|
| 351 |
+
</div>
|
| 352 |
+
<!-- End of Chat Window Section -->
|
| 353 |
+
|
| 354 |
+
<!-- Python Interpreter Section -->
|
| 355 |
+
<div id="coder-python-container" style="flex: 1; display: flex; flex-direction: column; gap: 10px;">
|
| 356 |
+
<iframe src="https://pyodide.org/en/stable/console.html" style="flex: 1; border: none; border-radius: var(--border-radius);"></iframe>
|
| 357 |
+
</div>
|
| 358 |
+
<!-- End of Python Interpreter Section -->
|
| 359 |
+
</div>
|
| 360 |
+
<!-- End of Wrapper for Chat and Python Interpreter -->
|
| 361 |
+
|
| 362 |
+
<!-- Loading Spinner and Configuration Info (if any additional) can remain as is -->
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
<!-- --------------------Coder Content Ends---------------------------------------- -->
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
<!-- --------------------Math Content Starts--------------------------------------- -->
|
| 371 |
+
<div id="advanced-math" class="content-section hidden">
|
| 372 |
+
<div class="card advanced-math-card">
|
| 373 |
+
<!-- Top Controls -->
|
| 374 |
+
<div class="math-options">
|
| 375 |
+
<!-- Model Selection Section -->
|
| 376 |
+
<div id="math-model-selection-container" class="option-section">
|
| 377 |
+
<label for="math-model-selection">Select Math Model:</label>
|
| 378 |
+
<select id="math-model-selection"></select>
|
| 379 |
+
<button id="math-download" disabled>Initialize Model</button>
|
| 380 |
+
</div>
|
| 381 |
+
|
| 382 |
+
<!-- Tool Selection Section -->
|
| 383 |
+
<div id="math-tool-selection-container" class="option-section">
|
| 384 |
+
<label for="math-tools">Select Voice:</label>
|
| 385 |
+
<select id="math-tools"></select>
|
| 386 |
+
</div>
|
| 387 |
+
|
| 388 |
+
<!-- Speech Controls Section -->
|
| 389 |
+
<div id="math-speech-controls" class="option-section">
|
| 390 |
+
<label for="math-speech-rate">Speech Rate:</label>
|
| 391 |
+
<input type="range" id="math-speech-rate" min="0.5" max="2" step="0.1" value="1" disabled>
|
| 392 |
+
|
| 393 |
+
<label for="math-speech-pitch">Speech Pitch:</label>
|
| 394 |
+
<input type="range" id="math-speech-pitch" min="0" max="2" step="0.1" value="1" disabled>
|
| 395 |
+
</div>
|
| 396 |
+
|
| 397 |
+
<!-- Logs Section -->
|
| 398 |
+
<div id="math-logs-container" class="option-section">
|
| 399 |
+
<h3>Logs</h3>
|
| 400 |
+
<div id="math-logs">
|
| 401 |
+
<!-- Logs will appear here -->
|
| 402 |
+
</div>
|
| 403 |
+
<button id="math-clear-logs">Clear Logs</button>
|
| 404 |
+
</div>
|
| 405 |
+
</div>
|
| 406 |
+
|
| 407 |
+
<!-- Chat Window Section -->
|
| 408 |
+
<div class="chat-window">
|
| 409 |
+
<!-- Chat Box Section -->
|
| 410 |
+
<div id="math-chat-container">
|
| 411 |
+
<div id="math-chat-box">
|
| 412 |
+
<!-- Chat messages will appear here -->
|
| 413 |
+
</div>
|
| 414 |
+
|
| 415 |
+
<!-- Chat Stats -->
|
| 416 |
+
<div id="math-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 417 |
+
|
| 418 |
+
<!-- Chat Input Section -->
|
| 419 |
+
<div id="math-text-input-container">
|
| 420 |
+
<input type="text" id="math-text-input" placeholder="Type your math problem here..." disabled>
|
| 421 |
+
<button id="math-submit-button" disabled>Submit</button>
|
| 422 |
+
</div>
|
| 423 |
+
|
| 424 |
+
<!-- Microphone Controls -->
|
| 425 |
+
<div id="math-mic-container">
|
| 426 |
+
<button id="math-start_button" aria-label="Start Voice Input" disabled>
|
| 427 |
+
<!-- Mic Icon SVG -->
|
| 428 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 429 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 430 |
+
</svg>
|
| 431 |
+
</button>
|
| 432 |
+
<button id="math-stop_button" aria-label="Stop Speech" disabled>
|
| 433 |
+
<!-- Stop Icon SVG -->
|
| 434 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 435 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 436 |
+
</svg>
|
| 437 |
+
</button>
|
| 438 |
+
</div>
|
| 439 |
+
</div>
|
| 440 |
+
|
| 441 |
+
<!-- Loading Spinner -->
|
| 442 |
+
<div id="math-loading-spinner" class="hidden">
|
| 443 |
+
<div class="spinner"></div>
|
| 444 |
+
</div>
|
| 445 |
+
|
| 446 |
+
<!-- Configuration Info -->
|
| 447 |
+
<div id="math-configuration" class="hidden">
|
| 448 |
+
<p>Model Initialized: <span id="math-selected-model">N/A</span></p>
|
| 449 |
+
</div>
|
| 450 |
+
</div>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
<!-- --------------------Math Content Ends----------------------------------------------- -->
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
|
| 458 |
+
<!-- --------------------Interdisciplinary Content Starts-------------------------------- -->
|
| 459 |
+
<div id="interdisciplinary" class="content-section hidden">
|
| 460 |
+
<div class="card interdisciplinary-card">
|
| 461 |
+
<!-- Interdisciplinary Studies Assistant Layout -->
|
| 462 |
+
<div class="inter-options">
|
| 463 |
+
<!-- Model Selection Section -->
|
| 464 |
+
<div id="inter-model-selection-container" class="option-section">
|
| 465 |
+
<label for="inter-model-selection">Select Model:</label>
|
| 466 |
+
<select id="inter-model-selection"></select>
|
| 467 |
+
<button id="inter-download" disabled>Initialize Model</button>
|
| 468 |
+
</div>
|
| 469 |
+
|
| 470 |
+
<!-- Voice Selection Section -->
|
| 471 |
+
<div id="inter-tool-selection-container" class="option-section">
|
| 472 |
+
<label for="inter-tools">Select Voice:</label>
|
| 473 |
+
<select id="inter-tools"></select>
|
| 474 |
+
</div>
|
| 475 |
+
|
| 476 |
+
<!-- Speech Controls Section -->
|
| 477 |
+
<div id="inter-speech-controls" class="option-section">
|
| 478 |
+
<label for="speech-rate">Speech Rate:</label>
|
| 479 |
+
<input type="range" id="speech-rate" min="0.5" max="2" step="0.1" value="1" disabled>
|
| 480 |
+
|
| 481 |
+
<label for="speech-pitch">Speech Pitch:</label>
|
| 482 |
+
<input type="range" id="speech-pitch" min="0" max="2" step="0.1" value="1" disabled>
|
| 483 |
+
</div>
|
| 484 |
+
|
| 485 |
+
<!-- Logs Section -->
|
| 486 |
+
<div id="inter-logs-container" class="option-section">
|
| 487 |
+
<h3>Logs</h3>
|
| 488 |
+
<div id="inter-logs">
|
| 489 |
+
<!-- Logs will appear here -->
|
| 490 |
+
</div>
|
| 491 |
+
<button id="inter-clear-logs">Clear Logs</button>
|
| 492 |
+
</div>
|
| 493 |
+
</div>
|
| 494 |
+
|
| 495 |
+
<div class="chat-window">
|
| 496 |
+
<!-- Chat Box Section -->
|
| 497 |
+
<div id="inter-chat-container">
|
| 498 |
+
<div id="inter-chat-box">
|
| 499 |
+
<!-- Chat messages will appear here -->
|
| 500 |
+
</div>
|
| 501 |
+
|
| 502 |
+
<!-- Chat Stats -->
|
| 503 |
+
<div id="inter-chat-stats" class="hidden">Runtime Stats: N/A</div>
|
| 504 |
+
|
| 505 |
+
<!-- Chat Input Section -->
|
| 506 |
+
<div id="inter-text-input-container">
|
| 507 |
+
<input type="text" id="inter-text-input" placeholder="Type your message here..." disabled>
|
| 508 |
+
<button id="inter-submit-button" disabled>Send</button>
|
| 509 |
+
</div>
|
| 510 |
+
|
| 511 |
+
<!-- Microphone Controls -->
|
| 512 |
+
<div id="inter-mic-container">
|
| 513 |
+
<button id="inter-start_button" aria-label="Start Voice Input" disabled>
|
| 514 |
+
<!-- Mic Icon SVG -->
|
| 515 |
+
<svg class="mic-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
| 516 |
+
<path d="M12 14a3 3 0 003-3V5a3 3 0 00-6 0v6a3 3 0 003 3zm5-3a5 5 0 01-10 0H5a7 7 0 0014 0h-2z"/>
|
| 517 |
+
</svg>
|
| 518 |
+
</button>
|
| 519 |
+
<button id="inter-stop_button" aria-label="Stop Speech" disabled>
|
| 520 |
+
<!-- Stop Icon SVG -->
|
| 521 |
+
<svg class="stop-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
| 522 |
+
<rect x="6" y="6" width="12" height="12" rx="2" ry="2"></rect>
|
| 523 |
+
</svg>
|
| 524 |
+
</button>
|
| 525 |
+
</div>
|
| 526 |
+
</div>
|
| 527 |
+
|
| 528 |
+
<!-- Loading Spinner -->
|
| 529 |
+
<div id="loading-spinner" class="hidden">
|
| 530 |
+
<div class="spinner"></div>
|
| 531 |
+
</div>
|
| 532 |
+
|
| 533 |
+
<!-- Configuration Info -->
|
| 534 |
+
<div id="inter-configuration" class="hidden">
|
| 535 |
+
<p>Model Initialized: <span id="inter-selected-model">N/A</span></p>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
</div>
|
| 539 |
+
</div>
|
| 540 |
+
<!-- --------------------Interdisciplinary Content Ends------------------------------------- -->
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
|
| 544 |
+
|
| 545 |
+
<!-- --------------------Insights Content Starts------------------------------------------- -->
|
| 546 |
+
<div id="insights" class="content-section hidden">
|
| 547 |
+
<div class="card">
|
| 548 |
+
<h2>Insights</h2>
|
| 549 |
+
|
| 550 |
+
<!-- New: Insights Tabs -->
|
| 551 |
+
<div class="insights-tabs">
|
| 552 |
+
<button class="insights-tab-button active" data-insights-tab="pdf">Insights PDF</button>
|
| 553 |
+
<button class="insights-tab-button" data-insights-tab="images">Insights Images</button>
|
| 554 |
+
<button class="insights-tab-button" data-insights-tab="translator">Translator</button>
|
| 555 |
+
<button class="insights-tab-button" data-insights-tab="youtube">Youtube Summarizer</button>
|
| 556 |
+
</div>
|
| 557 |
+
|
| 558 |
+
<!-- New: Insights Tab Contents -->
|
| 559 |
+
<div class="insights-tab-content">
|
| 560 |
+
<!-- Insights PDF Content -->
|
| 561 |
+
<div id="pdf" class="insights-content active">
|
| 562 |
+
<iframe
|
| 563 |
+
src="https://cin-model-kotaemon-demo.hf.space/"
|
| 564 |
+
width="100%"
|
| 565 |
+
height="600px"
|
| 566 |
+
style="border: none; border-radius: 12px;"
|
| 567 |
+
title="Insights PDF"
|
| 568 |
+
></iframe>
|
| 569 |
+
</div>
|
| 570 |
+
|
| 571 |
+
<!-- Insights Images Content -->
|
| 572 |
+
<div id="images" class="insights-content hidden">
|
| 573 |
+
<p>Content for Insights Images will go here.</p>
|
| 574 |
+
</div>
|
| 575 |
+
|
| 576 |
+
<!-- Translator Content -->
|
| 577 |
+
<div id="translator" class="insights-content hidden">
|
| 578 |
+
<p>Content for Translator will go here.</p>
|
| 579 |
+
</div>
|
| 580 |
+
|
| 581 |
+
<!-- Youtube Summarizer Content -->
|
| 582 |
+
<div id="youtube" class="insights-content hidden">
|
| 583 |
+
<p>Content for Youtube Summarizer will go here.</p>
|
| 584 |
+
</div>
|
| 585 |
+
</div>
|
| 586 |
+
</div>
|
| 587 |
+
</div>
|
| 588 |
+
<!-- --------------------Insights Content Ends------------------------------------------- -->
|
| 589 |
+
|
| 590 |
+
|
| 591 |
+
|
| 592 |
+
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
<!-- --------------------Podcast Content Starts------------------------------------------- -->
|
| 596 |
+
<div id="podcast" class="content-section hidden">
|
| 597 |
+
<div class="card">
|
| 598 |
+
<h2>Podcast</h2>
|
| 599 |
+
|
| 600 |
+
<!-- New: Podcast Tabs -->
|
| 601 |
+
<div class="podcast-tabs">
|
| 602 |
+
<button class="podcast-tab-button active" data-podcast-tab="document-podcast">Document Podcast</button>
|
| 603 |
+
<button class="podcast-tab-button" data-podcast-tab="conversational-podcast">Conversational Podcast</button>
|
| 604 |
+
</div>
|
| 605 |
+
|
| 606 |
+
<!-- New: Podcast Tab Contents -->
|
| 607 |
+
<div class="podcast-tab-content">
|
| 608 |
+
<!-- Document Podcast Content -->
|
| 609 |
+
<div id="document-podcast" class="podcast-content active">
|
| 610 |
+
<iframe src="https://gabrielchua-open-notebooklm.hf.space/"
|
| 611 |
+
width="100%"
|
| 612 |
+
height="600px"
|
| 613 |
+
style="border: none; border-radius: 12px;"
|
| 614 |
+
title="Document Podcast">
|
| 615 |
+
</iframe>
|
| 616 |
+
</div>
|
| 617 |
+
|
| 618 |
+
<!-- Conversational Podcast Content -->
|
| 619 |
+
<div id="conversational-podcast" class="podcast-content hidden">
|
| 620 |
+
<p>Content for Conversational Podcast will go here.</p>
|
| 621 |
+
</div>
|
| 622 |
+
</div>
|
| 623 |
+
<!-- End of Podcast Tab Contents -->
|
| 624 |
+
|
| 625 |
+
</div>
|
| 626 |
+
</div>
|
| 627 |
+
<!-- --------------------Podcast Content Ends--------------------------------------------- -->
|
| 628 |
+
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
|
| 633 |
+
|
| 634 |
+
<!-- --------------------3d-explorer Content Starts------------------------------------------- -->
|
| 635 |
+
<div id="3d-explorer" class="content-section hidden">
|
| 636 |
+
<div class="card">
|
| 637 |
+
<h2>3D Explorer</h2>
|
| 638 |
+
<p>Content for 3D Explorer will go here.</p>
|
| 639 |
+
</div>
|
| 640 |
+
</div>
|
| 641 |
+
<!-- --------------------3d-explorer Content Ends--------------------------------------------- -->
|
| 642 |
+
|
| 643 |
+
|
| 644 |
+
<div id="knowledge-base" class="content-section hidden">
|
| 645 |
+
<div class="card">
|
| 646 |
+
<h2>Knowledge Base</h2>
|
| 647 |
+
<p>Content for Knowledge Base will go here, Treasured Teachings, Vintage Papers, Digital Dustbin.</p>
|
| 648 |
+
</div>
|
| 649 |
+
</div>
|
| 650 |
+
|
| 651 |
+
<div id="digital-twin" class="content-section hidden">
|
| 652 |
+
<div class="card">
|
| 653 |
+
<h2>Digital Twin</h2>
|
| 654 |
+
<p>Persona, Memory, Social Graph, Class Notes, Homework, Tracker.</p>
|
| 655 |
+
</div>
|
| 656 |
+
</div>
|
| 657 |
+
|
| 658 |
+
</div>
|
| 659 |
+
</div>
|
| 660 |
+
|
| 661 |
+
<!-- Include Axios from CDN -->
|
| 662 |
+
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
| 663 |
+
|
| 664 |
+
<!-- Include the necessary scripts -->
|
| 665 |
+
<script type="module">
|
| 666 |
+
// Sidebar navigation
|
| 667 |
+
const sidebarLinks = document.querySelectorAll('.sidebar a');
|
| 668 |
+
const contentSections = document.querySelectorAll('.content-section');
|
| 669 |
+
|
| 670 |
+
sidebarLinks.forEach(link => {
|
| 671 |
+
link.addEventListener('click', (e) => {
|
| 672 |
+
e.preventDefault();
|
| 673 |
+
// Remove active class from all links
|
| 674 |
+
sidebarLinks.forEach(l => l.classList.remove('active'));
|
| 675 |
+
// Add active class to the clicked link
|
| 676 |
+
link.classList.add('active');
|
| 677 |
+
|
| 678 |
+
// Hide all content sections
|
| 679 |
+
contentSections.forEach(section => section.classList.add('hidden'));
|
| 680 |
+
|
| 681 |
+
// Show the selected content section
|
| 682 |
+
const target = link.getAttribute('data-content');
|
| 683 |
+
document.getElementById(target).classList.remove('hidden');
|
| 684 |
+
});
|
| 685 |
+
});
|
| 686 |
+
</script>
|
| 687 |
+
|
| 688 |
+
|
| 689 |
+
<!-- Include the necessary scripts -->
|
| 690 |
+
<!-- Include Pyodide Script -->
|
| 691 |
+
|
| 692 |
+
|
| 693 |
+
<script type="module" src="digital.human.audio.js"> </script>
|
| 694 |
+
<script type="module" src="digital.human.video.js"> </script>
|
| 695 |
+
<script type="module" src="coder.js"> </script>
|
| 696 |
+
<script type="module" src="advanced.math.js"></script>
|
| 697 |
+
<script type="module" src="interdisciplinary.js"></script> <!-- New JS for Interdisciplinary -->
|
| 698 |
+
<script type="module" src="insights.js"></script>
|
| 699 |
+
|
| 700 |
+
</body>
|
| 701 |
+
</html>
|
insights.css
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* --------------------Insights Tabs Styling-------------------- */
|
| 2 |
+
.insights-tabs {
|
| 3 |
+
display: flex;
|
| 4 |
+
gap: 10px;
|
| 5 |
+
margin-bottom: 20px;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
.insights-tab-button {
|
| 9 |
+
flex: 1;
|
| 10 |
+
padding: 10px 15px;
|
| 11 |
+
background: linear-gradient(135deg, #00796B, #004D40);
|
| 12 |
+
border: none;
|
| 13 |
+
color: white;
|
| 14 |
+
font-size: 1em;
|
| 15 |
+
border-radius: 8px;
|
| 16 |
+
cursor: pointer;
|
| 17 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 18 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.insights-tab-button:hover:not(:disabled) {
|
| 22 |
+
background: linear-gradient(135deg, #005D56, #00332E);
|
| 23 |
+
transform: translateY(-2px);
|
| 24 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.insights-tab-button.active {
|
| 28 |
+
background: linear-gradient(135deg, #004D40, #00332E);
|
| 29 |
+
cursor: default;
|
| 30 |
+
box-shadow: none;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.insights-tab-content .insights-content {
|
| 34 |
+
display: none;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.insights-tab-content .insights-content.active {
|
| 38 |
+
display: block;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
/* Responsive Adjustments */
|
| 42 |
+
@media (max-width: 800px) {
|
| 43 |
+
.insights-tabs {
|
| 44 |
+
flex-direction: column;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.insights-tab-button {
|
| 48 |
+
flex: none;
|
| 49 |
+
width: 100%;
|
| 50 |
+
}
|
| 51 |
+
}
|
insights.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// --------------------Insights Tabs Functionality--------------------
|
| 2 |
+
const insightsTabButtons = document.querySelectorAll('.insights-tab-button');
|
| 3 |
+
const insightsContents = document.querySelectorAll('.insights-content');
|
| 4 |
+
|
| 5 |
+
insightsTabButtons.forEach(button => {
|
| 6 |
+
button.addEventListener('click', () => {
|
| 7 |
+
// Remove active class from all buttons
|
| 8 |
+
insightsTabButtons.forEach(btn => btn.classList.remove('active'));
|
| 9 |
+
// Add active class to the clicked button
|
| 10 |
+
button.classList.add('active');
|
| 11 |
+
|
| 12 |
+
// Hide all insights content
|
| 13 |
+
insightsContents.forEach(content => {
|
| 14 |
+
content.classList.add('hidden');
|
| 15 |
+
content.classList.remove('active');
|
| 16 |
+
});
|
| 17 |
+
|
| 18 |
+
// Show the selected insights content
|
| 19 |
+
const target = button.getAttribute('data-insights-tab');
|
| 20 |
+
const targetContent = document.getElementById(target);
|
| 21 |
+
targetContent.classList.remove('hidden');
|
| 22 |
+
targetContent.classList.add('active');
|
| 23 |
+
});
|
| 24 |
+
});
|
| 25 |
+
|
podcast.css
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* --------------------Podcast Tabs Styling-------------------- */
|
| 2 |
+
.podcast-tabs {
|
| 3 |
+
display: flex;
|
| 4 |
+
gap: 10px;
|
| 5 |
+
margin-bottom: 20px;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
.podcast-tab-button {
|
| 9 |
+
flex: 1;
|
| 10 |
+
padding: 10px 15px;
|
| 11 |
+
background: linear-gradient(135deg, #00796B, #004D40);
|
| 12 |
+
border: none;
|
| 13 |
+
color: white;
|
| 14 |
+
font-size: 1em;
|
| 15 |
+
border-radius: 8px;
|
| 16 |
+
cursor: pointer;
|
| 17 |
+
transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
|
| 18 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.podcast-tab-button:hover:not(:disabled) {
|
| 22 |
+
background: linear-gradient(135deg, #005D56, #00332E);
|
| 23 |
+
transform: translateY(-2px);
|
| 24 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.podcast-tab-button.active {
|
| 28 |
+
background: linear-gradient(135deg, #004D40, #00332E);
|
| 29 |
+
cursor: default;
|
| 30 |
+
box-shadow: none;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.podcast-tab-content .podcast-content {
|
| 34 |
+
display: none;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.podcast-tab-content .podcast-content.active {
|
| 38 |
+
display: block;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
/* Responsive Adjustments */
|
| 42 |
+
@media (max-width: 800px) {
|
| 43 |
+
.podcast-tabs {
|
| 44 |
+
flex-direction: column;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.podcast-tab-button {
|
| 48 |
+
flex: none;
|
| 49 |
+
width: 100%;
|
| 50 |
+
}
|
| 51 |
+
}
|