SunderAli17 commited on
Commit
0388786
1 Parent(s): a0f82ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -5,6 +5,7 @@ from llama_index.core import StorageContext, load_index_from_storage, VectorStor
5
  from llama_index.llms.huggingface import HuggingFaceInferenceAPI
6
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
7
  from sentence_transformers import SentenceTransformer
 
8
 
9
  load_dotenv()
10
 
@@ -32,6 +33,7 @@ os.makedirs(PERSIST_DIR, exist_ok=True)
32
  # Variable to store current chat conversation
33
  current_chat_history = []
34
 
 
35
  def data_ingestion_from_directory():
36
  # Use SimpleDirectoryReader on the directory containing the PDF files
37
  documents = SimpleDirectoryReader(PDF_DIRECTORY).load_data()
 
5
  from llama_index.llms.huggingface import HuggingFaceInferenceAPI
6
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
7
  from sentence_transformers import SentenceTransformer
8
+ import spaces
9
 
10
  load_dotenv()
11
 
 
33
  # Variable to store current chat conversation
34
  current_chat_history = []
35
 
36
+ @spaces.gpu
37
  def data_ingestion_from_directory():
38
  # Use SimpleDirectoryReader on the directory containing the PDF files
39
  documents = SimpleDirectoryReader(PDF_DIRECTORY).load_data()