Spanicin commited on
Commit
b3ef369
·
verified ·
1 Parent(s): e755f11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -33,12 +33,12 @@ app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_credentials=True,
33
  executor = ThreadPoolExecutor()
34
 
35
  # Determine the device (GPU or CPU)
36
- if torch.cuda.is_available():
37
- device = "cuda"
38
- logger.info("CUDA is available. Using GPU.")
39
- else:
40
- device = "cpu"
41
- logger.info("CUDA is not available. Using CPU.")
42
 
43
  # Load model from Huggingface Hub
44
  huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
 
33
  executor = ThreadPoolExecutor()
34
 
35
  # Determine the device (GPU or CPU)
36
+ # if torch.cuda.is_available():
37
+ # device = "cuda"
38
+ # logger.info("CUDA is available. Using GPU.")
39
+ # else:
40
+ device = "cpu"
41
+ # logger.info("CUDA is not available. Using CPU.")
42
 
43
  # Load model from Huggingface Hub
44
  huggingface_token = os.getenv("HUGGINGFACE_TOKEN")