rosemariafontana commited on
Commit
31e8049
Β·
verified Β·
1 Parent(s): 1a068af

update print for cuda

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -12,7 +12,10 @@ processor = LayoutLMv3Processor.from_pretrained("microsoft/layoutlmv3-base")
12
  model = LayoutLMv3ForTokenClassification.from_pretrained("microsoft/layoutlmv3-base")
13
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
14
 
 
 
15
  print(f"Debug -- Using device: {device}")
 
16
  model.to(device)
17
 
18
  labels = model.config.id2label
 
12
  model = LayoutLMv3ForTokenClassification.from_pretrained("microsoft/layoutlmv3-base")
13
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
14
 
15
+ print_device_name = torch.cuda.get_device_name(torch.cuda.current_device())
16
+
17
  print(f"Debug -- Using device: {device}")
18
+ print(f"Debug -- Current Device Name: {print_device_name}")
19
  model.to(device)
20
 
21
  labels = model.config.id2label