S-4-G-4-R commited on
Commit
d3a9990
·
verified ·
1 Parent(s): b42b1cc

Update ui/gpu.py

Browse files
Files changed (1) hide show
  1. ui/gpu.py +2 -2
ui/gpu.py CHANGED
@@ -36,9 +36,9 @@ GPU_DEVICE = "cuda" if ON_ZEROGPU else "cpu"
36
  # itself. A long paper on a cold cache is the worst case.
37
  _VECTORIZE_SECONDS = 120
38
 
39
-
40
  @spaces.GPU(duration=_VECTORIZE_SECONDS)
41
- print(f"[GPU FN] pid={os.getpid()}, in ZeroGPU ctx: {os.environ.get('SPACES_ZERO_GPU')}")
 
42
  def vectorize_on_gpu(pdf_path: str) -> None:
43
  """Build and persist this paper's vectorstore with the embedder on GPU.
44
 
 
36
  # itself. A long paper on a cold cache is the worst case.
37
  _VECTORIZE_SECONDS = 120
38
 
 
39
  @spaces.GPU(duration=_VECTORIZE_SECONDS)
40
+ zero_gpu_flag = os.environ.get("SPACES_ZERO_GPU")
41
+ print("[GPU FN] pid=" + str(os.getpid()) + ", in ZeroGPU ctx: " + str(zero_gpu_flag))
42
  def vectorize_on_gpu(pdf_path: str) -> None:
43
  """Build and persist this paper's vectorstore with the embedder on GPU.
44