Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,6 @@ from streamlit_pdf_viewer import pdf_viewer
|
|
| 5 |
from github import Github
|
| 6 |
import shutil # Make sure this is imported at the top
|
| 7 |
|
| 8 |
-
# --- Configuration ---
|
| 9 |
-
TOPICS_DIR = "topics"
|
| 10 |
-
TEMP_DIR = "temp_build"
|
| 11 |
-
os.makedirs(TEMP_DIR, exist_ok=True)
|
| 12 |
|
| 13 |
def pull_from_github():
|
| 14 |
"""
|
|
@@ -56,7 +52,13 @@ def pull_from_github():
|
|
| 56 |
if not os.path.exists(TOPICS_DIR) or not os.listdir(TOPICS_DIR):
|
| 57 |
print("System restart detected. Auto-pulling files from GitHub...")
|
| 58 |
pull_from_github()
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
st.set_page_config(page_title="Physics Topics", layout="wide")
|
| 61 |
|
| 62 |
# ==========================================
|
|
|
|
| 5 |
from github import Github
|
| 6 |
import shutil # Make sure this is imported at the top
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
def pull_from_github():
|
| 10 |
"""
|
|
|
|
| 52 |
if not os.path.exists(TOPICS_DIR) or not os.listdir(TOPICS_DIR):
|
| 53 |
print("System restart detected. Auto-pulling files from GitHub...")
|
| 54 |
pull_from_github()
|
| 55 |
+
|
| 56 |
+
# --- Configuration ---
|
| 57 |
+
TOPICS_DIR = "topics"
|
| 58 |
+
TEMP_DIR = "temp_build"
|
| 59 |
+
os.makedirs(TEMP_DIR, exist_ok=True)
|
| 60 |
+
|
| 61 |
+
|
| 62 |
st.set_page_config(page_title="Physics Topics", layout="wide")
|
| 63 |
|
| 64 |
# ==========================================
|