Update app.py
Browse files
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()
|