Fix the deployment space problem
Browse files- Dockerfile +5 -0
- ui/index.html +1 -1
Dockerfile
CHANGED
|
@@ -121,6 +121,11 @@ async def predict(file: UploadFile = File(...)):\n\
|
|
| 121 |
RUN mkdir -p ui
|
| 122 |
COPY ui/index.html ui/
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
# Set proper permissions for user
|
| 125 |
RUN chown -R user:user /app
|
| 126 |
|
|
|
|
| 121 |
RUN mkdir -p ui
|
| 122 |
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 |
+
|
| 129 |
# Set proper permissions for user
|
| 130 |
RUN chown -R user:user /app
|
| 131 |
|
ui/index.html
CHANGED
|
@@ -308,7 +308,7 @@
|
|
| 308 |
</div>
|
| 309 |
|
| 310 |
<script>
|
| 311 |
-
const API_URL = '
|
| 312 |
const dropZone = document.getElementById('dropZone');
|
| 313 |
const fileInput = document.getElementById('fileInput');
|
| 314 |
const loading = document.getElementById('loading');
|
|
|
|
| 308 |
</div>
|
| 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');
|