MEOW commited on
Commit
c865328
·
unverified ·
1 Parent(s): 336d4ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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