mortezahaydari commited on
Commit
c958ed5
·
verified ·
1 Parent(s): 2e1e2c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -4,11 +4,11 @@ from transformers import pipeline
4
 
5
  # Detect if a GPU is available
6
  if torch.cuda.is_available():
7
- device = "cuda"
8
- print("has cuda.")
9
- else:
10
- device = "cpu"
11
- print("no cuda.")
12
 
13
  # Print device info (this will be logged in Hugging Face Spaces container)
14
  if torch.cuda.is_available():
 
4
 
5
  # Detect if a GPU is available
6
  if torch.cuda.is_available():
7
+ device = "cuda"
8
+ print("has cuda.")
9
+ else:
10
+ device = "cpu"
11
+ print("no cuda.")
12
 
13
  # Print device info (this will be logged in Hugging Face Spaces container)
14
  if torch.cuda.is_available():