justinj92 commited on
Commit
2a04ac7
1 Parent(s): 8b93608

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -4,6 +4,13 @@ from llama_index.core import Settings
4
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
5
  import torch
6
  import spaces
 
 
 
 
 
 
 
7
 
8
 
9
  documents = SimpleDirectoryReader("./data").load_data()
 
4
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
5
  import torch
6
  import spaces
7
+ import subprocess
8
+
9
+ subprocess.run(
10
+ "pip install flash-attn --no-build-isolation",
11
+ env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
12
+ shell=True,
13
+ )
14
 
15
 
16
  documents = SimpleDirectoryReader("./data").load_data()