Fix the deployment space problem
Browse files- Dockerfile +1 -0
- ui/index.html +3 -0
Dockerfile
CHANGED
|
@@ -123,6 +123,7 @@ COPY ui/index.html ui/
|
|
| 123 |
|
| 124 |
|
| 125 |
# Update API URL in HTML to point to the HuggingFace Space URL
|
|
|
|
| 126 |
RUN sed -i "s|const API_URL = 'http://localhost:8000'|const API_URL = 'https://readylab-vizref.hf.space'|g" ui/index.html
|
| 127 |
|
| 128 |
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
# Update API URL in HTML to point to the HuggingFace Space URL
|
| 126 |
+
# Make sure this matches your actual space URL!
|
| 127 |
RUN sed -i "s|const API_URL = 'http://localhost:8000'|const API_URL = 'https://readylab-vizref.hf.space'|g" ui/index.html
|
| 128 |
|
| 129 |
|
ui/index.html
CHANGED
|
@@ -309,6 +309,9 @@
|
|
| 309 |
|
| 310 |
<script>
|
| 311 |
const API_URL = 'http://localhost:8000';
|
|
|
|
|
|
|
|
|
|
| 312 |
const dropZone = document.getElementById('dropZone');
|
| 313 |
const fileInput = document.getElementById('fileInput');
|
| 314 |
const loading = document.getElementById('loading');
|
|
|
|
| 309 |
|
| 310 |
<script>
|
| 311 |
const API_URL = 'http://localhost:8000';
|
| 312 |
+
console.log('Initial API_URL:', API_URL);
|
| 313 |
+
console.log('Current location:', window.location.href);
|
| 314 |
+
console.log('Will make requests to:', API_URL ? API_URL : window.location.origin);
|
| 315 |
const dropZone = document.getElementById('dropZone');
|
| 316 |
const fileInput = document.getElementById('fileInput');
|
| 317 |
const loading = document.getElementById('loading');
|