Update app.py
Browse files
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 |
-
|
| 38 |
-
|
| 39 |
-
else:
|
| 40 |
-
|
| 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")
|