Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,14 @@ import streamlit as st
|
|
| 2 |
import os
|
| 3 |
import subprocess
|
| 4 |
from streamlit_pdf_viewer import pdf_viewer
|
|
|
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# --- Configuration ---
|
| 7 |
TOPICS_DIR = "topics"
|
| 8 |
TEMP_DIR = "temp_build"
|
|
|
|
| 2 |
import os
|
| 3 |
import subprocess
|
| 4 |
from streamlit_pdf_viewer import pdf_viewer
|
| 5 |
+
import shutil
|
| 6 |
|
| 7 |
+
# Add this right after your imports
|
| 8 |
+
if not shutil.which("pdflatex"):
|
| 9 |
+
st.error("❌ LaTeX compiler not found!")
|
| 10 |
+
st.info("If you are on HuggingFace/Streamlit Cloud, make sure 'packages.txt' is in the root directory and contains 'texlive-latex-base'.")
|
| 11 |
+
st.stop()
|
| 12 |
+
|
| 13 |
# --- Configuration ---
|
| 14 |
TOPICS_DIR = "topics"
|
| 15 |
TEMP_DIR = "temp_build"
|