mariamomar314 commited on
Commit
84bd65d
·
verified ·
1 Parent(s): a25cfdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -5,6 +5,15 @@ from llama_index.core.settings import Settings
5
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
6
  from llama_index.llms.openai import OpenAI
7
 
 
 
 
 
 
 
 
 
 
8
  # Set OpenAI API key (to be added via Hugging Face secrets)
9
  os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
10
 
 
5
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
6
  from llama_index.llms.openai import OpenAI
7
 
8
+
9
+
10
+ # Folder you want to create
11
+ folder_path = "data"
12
+
13
+ # Check if it exists, if not, create it
14
+ if not os.path.exists(folder_path):
15
+ os.makedirs(folder_path)
16
+
17
  # Set OpenAI API key (to be added via Hugging Face secrets)
18
  os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
19