nikigoli commited on
Commit
5bd9c1c
1 Parent(s): aa16cc4

Removed print statements

Browse files
Files changed (1) hide show
  1. app.py +0 -9
app.py CHANGED
@@ -26,7 +26,6 @@ import shlex
26
  import shutil
27
  os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "tmp")
28
  cwd = os.getcwd()
29
- print("Current working directory:", cwd)
30
 
31
  # Installing dependencies not in requirements.txt
32
  subprocess.run(
@@ -75,7 +74,6 @@ def find_cuda():
75
  return None
76
 
77
  cuda_path = find_cuda()
78
- print("Cuda path: " + str(cuda_path))
79
 
80
  class AppSteps(Enum):
81
  JUST_TEXT = 1
@@ -148,10 +146,8 @@ def get_args_parser():
148
 
149
  def get_device():
150
  if torch.cuda.is_available():
151
- print("USING GPU")
152
  return torch.device('cuda')
153
  else:
154
- print("USING CPU")
155
  return torch.device('cpu')
156
 
157
  # Get counting model.
@@ -271,11 +267,6 @@ def count(image, text, prompts, state, device):
271
  input_image_exemplars = input_image_exemplars.unsqueeze(0).to(device)
272
  exemplars = [exemplars["exemplars"].to(device)]
273
 
274
- print("model device: " + str(next(model.parameters()).device))
275
- print("input image device: " + str(input_image.device))
276
- print("input image exemplars device: " + str(input_image_exemplars.device))
277
- print("exemplars device: " + str(exemplars[0].device))
278
-
279
  with torch.no_grad():
280
  model_output = model(
281
  nested_tensor_from_tensor_list(input_image),
 
26
  import shutil
27
  os.environ["GRADIO_TEMP_DIR"] = os.path.join(os.getcwd(), "tmp")
28
  cwd = os.getcwd()
 
29
 
30
  # Installing dependencies not in requirements.txt
31
  subprocess.run(
 
74
  return None
75
 
76
  cuda_path = find_cuda()
 
77
 
78
  class AppSteps(Enum):
79
  JUST_TEXT = 1
 
146
 
147
  def get_device():
148
  if torch.cuda.is_available():
 
149
  return torch.device('cuda')
150
  else:
 
151
  return torch.device('cpu')
152
 
153
  # Get counting model.
 
267
  input_image_exemplars = input_image_exemplars.unsqueeze(0).to(device)
268
  exemplars = [exemplars["exemplars"].to(device)]
269
 
 
 
 
 
 
270
  with torch.no_grad():
271
  model_output = model(
272
  nested_tensor_from_tensor_list(input_image),