Spaces:
Paused
Paused
MEOW commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,11 +57,11 @@ Settings.embed_model = XAIEmbedding()
|
|
| 57 |
Settings.text_splitter = SentenceSplitter(chunk_size=400)
|
| 58 |
|
| 59 |
# Ensure GPU usage
|
| 60 |
-
if torch.cuda.is_available():
|
| 61 |
-
logger.info("GPU is available and will be used.")
|
| 62 |
-
os.environ['CUDA_VISIBLE_DEVICES'] = '0' # Assuming you want to use GPU 0
|
| 63 |
-
else:
|
| 64 |
-
logger.warning("GPU not detected or not configured correctly. Falling back to CPU.")
|
| 65 |
|
| 66 |
index = None
|
| 67 |
query_engine = None
|
|
|
|
| 57 |
Settings.text_splitter = SentenceSplitter(chunk_size=400)
|
| 58 |
|
| 59 |
# Ensure GPU usage
|
| 60 |
+
#if torch.cuda.is_available():
|
| 61 |
+
# logger.info("GPU is available and will be used.")
|
| 62 |
+
# os.environ['CUDA_VISIBLE_DEVICES'] = '0' # Assuming you want to use GPU 0
|
| 63 |
+
#else:
|
| 64 |
+
# logger.warning("GPU not detected or not configured correctly. Falling back to CPU.")
|
| 65 |
|
| 66 |
index = None
|
| 67 |
query_engine = None
|