Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
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}")
|