Ahmed-14 commited on
Commit
3558e3b
·
1 Parent(s): 177b111

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # import logging
3
+ # import os
4
+ # os.environ['OPENAI_API_KEY'] = "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"
5
+ # import openai
6
+ # import json
7
+
8
+
9
+ # from llama_index import SimpleDirectoryReader, GPTSimpleVectorIndex, LLMPredictor, PromptHelper, ServiceContext, QuestionAnswerPrompt
10
+ # from langchain import OpenAI
11
+
12
+
13
+ # documents = SimpleDirectoryReader('GoChat/Gochat247_Data').load_data()
14
+
15
+ # from datasets import load_dataset
16
+ # documents = load_dataset("text", data_dir="https://huggingface.co/datasets/waelabou/Gochat247QA/tree/main")
17
+
18
+ # print(documents)
19
+
20
+
21
+ # import OS module
22
+ import os
23
+
24
+ # Get the list of all files and directories
25
+ path = "M:\Work\sim\Data"
26
+ dir_list = os.listdir(path)
27
+
28
+ print("Files and directories in '", path, "' :")
29
+
30
+ # prints all files
31
+ print(dir_list)