chenx906 commited on
Commit
1d3293d
·
1 Parent(s): 1f19ed4

Fix the deployment space problem

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -0
  2. 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 = 'https://readylab-vizref.hf.space';
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');