popboat1 commited on
Commit
8450fd0
·
1 Parent(s): 6281c1f

Fix CORS origin for Hugging Face and patch WebGL texture spam

Browse files
frontend/3d-visualizer/src/components/LayerCube.js CHANGED
@@ -12,7 +12,7 @@ const FeatureSlice = ({ texture, gridSize, index, sizeY, sizeZ, xOffset, geometr
12
  const row = Math.floor(index / gridSize);
13
  cloned.offset.set(col / gridSize, 1 - (row + 1) / gridSize);
14
 
15
- if (cloned.image) {
16
  cloned.needsUpdate = true;
17
  }
18
 
 
12
  const row = Math.floor(index / gridSize);
13
  cloned.offset.set(col / gridSize, 1 - (row + 1) / gridSize);
14
 
15
+ if (cloned.image && cloned.image.width > 0) {
16
  cloned.needsUpdate = true;
17
  }
18
 
src/api/api.py CHANGED
@@ -21,7 +21,7 @@ app = FastAPI()
21
 
22
  app.add_middleware(
23
  CORSMiddleware,
24
- allow_origins=["http://localhost:3000"],
25
  allow_credentials=True,
26
  allow_methods=["*"],
27
  allow_headers=["*"],
 
21
 
22
  app.add_middleware(
23
  CORSMiddleware,
24
+ allow_origins=["*"],
25
  allow_credentials=True,
26
  allow_methods=["*"],
27
  allow_headers=["*"],