Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion website/comprehensive-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,13 @@ <h5 class="fw-bold mb-3">SAMO Deep Learning</h5>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

<!-- Configuration -->
<script src="js/config.js"></script>

<script>
// API Configuration (Unified API)
const API_BASE_URL = 'https://samo-unified-api-frrnetyhfa-uc.a.run.app';
// Load API configuration from config.js
const API_BASE_URL = window.SAMO_CONFIG?.API?.BASE_URL || 'https://samo-unified-api-frrnetyhfa-uc.a.run.app';
let AUTH_TOKEN = null;
let CHAT_WS = null;

Expand Down
4 changes: 4 additions & 0 deletions website/favicon.ico
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<rect width="32" height="32" fill="#007bff"/>
<text x="16" y="22" font-family="Arial, sans-serif" font-size="18" font-weight="bold" text-anchor="middle" fill="white">S</text>
</svg>
4 changes: 4 additions & 0 deletions website/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ <h5 class="fw-bold mb-3">
<div class="code-block">
<pre><code>async function analyzeEmotion(text) {
const response = await fetch(
'https://samo-unified-api-frrnetyhfa-uc.a.run.app/analyze/journal',
`${API_BASE_URL}/analyze/journal`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
Expand Down Expand Up @@ -514,7 +514,7 @@ <h5 class="fw-bold mb-3">
results = []
for text in texts:
analysis = requests.post(
"https://samo-unified-api-frrnetyhfa-uc.a.run.app/analyze/journal",
`${API_BASE_URL}/analyze/journal`,
json={"text": text, "generate_summary": False}
).json()
results.append({
Expand All @@ -536,7 +536,7 @@ <h5 class="fw-bold mb-3">
const analyzeUserFeedback = async (feedback) => {
try {
const response = await fetch(
'https://samo-unified-api-frrnetyhfa-uc.a.run.app/analyze/journal',
`${API_BASE_URL}/analyze/journal`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
Expand Down Expand Up @@ -771,11 +771,17 @@ <h6 class="fw-bold mb-3">Connect</h6>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

<!-- Configuration -->
<script src="js/config.js"></script>

<!-- Demo Script -->
<script>
// Configure API Base URL for display (replace with your actual deployment URL)
const API_BASE_URL = 'https://api.example.com';
// Load API configuration from config.js
let API_BASE_URL = '';
document.addEventListener('DOMContentLoaded', () => {
// Use config if available, otherwise fallback
API_BASE_URL = window.SAMO_CONFIG?.API?.BASE_URL || 'https://api.example.com';
const el = document.getElementById('api-base-url');
if (el) el.textContent = API_BASE_URL;
});
Expand Down
Loading
Loading