hoghoghi2 / src /streamlit_app.py
Really-amin's picture
Update src/streamlit_app.py
b233d94 verified
raw
history blame contribute delete
909 Bytes
#!/usr/bin/env python3
"""
Iran Legal Information Dashboard - src/streamlit_app.py
====================================================
Main application file for src directory structure
"""
# Import the main application from the parent directory or current directory
import sys
import os
# Add current directory to path for imports
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, current_dir)
try:
# Try to import from current directory
from app import main
except ImportError:
try:
# Try to import from parent directory
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
from app import main
except ImportError:
import streamlit as st
st.error("❌ Could not import main application. Please ensure app.py is in the correct location.")
st.stop()
if __name__ == "__main__":
main()