Spaces:
Sleeping
Sleeping
Update script.js
Browse files
script.js
CHANGED
|
@@ -2,7 +2,7 @@ class ChatbotUI {
|
|
| 2 |
constructor() {
|
| 3 |
// Auto-detect API base URL for different deployment environments
|
| 4 |
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
|
| 5 |
-
this.apiBase = 'http://localhost:
|
| 6 |
} else {
|
| 7 |
// For Hugging Face Spaces or other deployments, use relative path
|
| 8 |
this.apiBase = '/api';
|
|
|
|
| 2 |
constructor() {
|
| 3 |
// Auto-detect API base URL for different deployment environments
|
| 4 |
if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
|
| 5 |
+
this.apiBase = 'http://localhost:7860/api';
|
| 6 |
} else {
|
| 7 |
// For Hugging Face Spaces or other deployments, use relative path
|
| 8 |
this.apiBase = '/api';
|