Arthur2G commited on
Commit
1baeb88
·
1 Parent(s): 78e2442

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -32,7 +32,9 @@ AZURE_ACCOUNT_KEY = account_key
32
  assert AZURE_ACCOUNT_NAME is not None and AZURE_ACCOUNT_NAME != ""
33
 
34
  fs = AzureBlobFileSystem(account_name=AZURE_ACCOUNT_NAME, account_key=AZURE_ACCOUNT_KEY)
35
-
 
 
36
 
37
  def construct_index(doc):
38
 
@@ -106,7 +108,7 @@ def extract_text(file):
106
  return text
107
 
108
  def extract_name(file):
109
-
110
  return os.path.basename(file.name)
111
 
112
  def ask_ai_upload(doc, question):
@@ -169,9 +171,7 @@ def respond_document_choose(message, chat_history, doc):
169
 
170
  return "", chat_history
171
 
172
- # Retrieve the documents name whose indexes are stored
173
- path_list = fs.ls('gpt/storage_demo')
174
- documents_list = [Path(path).name[:-4] for path in path_list]
175
 
176
  # Configure Gradio platform
177
 
 
32
  assert AZURE_ACCOUNT_NAME is not None and AZURE_ACCOUNT_NAME != ""
33
 
34
  fs = AzureBlobFileSystem(account_name=AZURE_ACCOUNT_NAME, account_key=AZURE_ACCOUNT_KEY)
35
+ # Retrieve the documents name whose indexes are stored
36
+ path_list = fs.ls('gpt/storage_demo')
37
+ documents_list = [Path(path).name[:-4] for path in path_list]
38
 
39
  def construct_index(doc):
40
 
 
108
  return text
109
 
110
  def extract_name(file):
111
+ path_list.append(os.path.basename(file.name))
112
  return os.path.basename(file.name)
113
 
114
  def ask_ai_upload(doc, question):
 
171
 
172
  return "", chat_history
173
 
174
+
 
 
175
 
176
  # Configure Gradio platform
177