Anne31415 commited on
Commit
96208c1
·
verified ·
1 Parent(s): 7f3e938

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -79,10 +79,14 @@ def load_vector_store(file_path, store_name, force_reload=False):
79
  os.chdir(local_repo_path)
80
 
81
  try:
82
- # Commit and push changes to the repository
83
- repo.git_add(vector_store_path) # Stage the file for commit
84
- repo.git_commit(f"Update vector store: {store_name}") # Commit the file
85
- repo.git_push() # Push the commit to the remote repository
 
 
 
 
86
  st.text("Committed and pushed vector store to repository.")
87
  except Exception as e:
88
  st.error(f"Error during Git operations: {e}")
 
79
  os.chdir(local_repo_path)
80
 
81
  try:
82
+ # Check current working directory and list files for debugging
83
+ st.text(f"Current working directory: {os.getcwd()}")
84
+ st.text(f"Files in current directory: {os.listdir()}")
85
+
86
+ # Adjusted file path for Git command
87
+ repo.git_add(f"{store_name}.pkl") # Use just the file name
88
+ repo.git_commit(f"Update vector store: {store_name}")
89
+ repo.git_push()
90
  st.text("Committed and pushed vector store to repository.")
91
  except Exception as e:
92
  st.error(f"Error during Git operations: {e}")