Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,18 +76,18 @@ scheduler_thread.start()
|
|
76 |
if os.path.exists(directory_path):
|
77 |
st.write('retriever loaded')
|
78 |
else:
|
79 |
-
try:
|
80 |
-
|
81 |
-
|
82 |
-
except subprocess.CalledProcessError as e:
|
83 |
-
|
84 |
|
85 |
# Run the second Python script
|
86 |
-
try:
|
87 |
-
|
88 |
-
|
89 |
-
except subprocess.CalledProcessError as e:
|
90 |
-
|
91 |
def load_from_pickle(filename):
|
92 |
with open(filename, "rb") as file:
|
93 |
return pickle.load(file)
|
|
|
76 |
if os.path.exists(directory_path):
|
77 |
st.write('retriever loaded')
|
78 |
else:
|
79 |
+
# try:
|
80 |
+
subprocess.run(["python", "scrape_github.py"], check=True)
|
81 |
+
st.write("GitHub repos downloaded")
|
82 |
+
# except subprocess.CalledProcessError as e:
|
83 |
+
# st.error(f"Error running scrape_github.py: {e}")
|
84 |
|
85 |
# Run the second Python script
|
86 |
+
# try:
|
87 |
+
subprocess.run(["python", "create_retriever.py"], check=True)
|
88 |
+
st.write("Retriever updated")
|
89 |
+
# except subprocess.CalledProcessError as e:
|
90 |
+
# st.error(f"Error running create_retriever.py: {e}")
|
91 |
def load_from_pickle(filename):
|
92 |
with open(filename, "rb") as file:
|
93 |
return pickle.load(file)
|