gelpredict / streamlit_app.py
awolter's picture
Upload streamlit_app.py with huggingface_hub
05846b4 verified
Raw History Blame Contribute Delete
902 Bytes
"""
GelPredict - Main Entry Point for HuggingFace Spaces
This file is the entry point that HuggingFace expects.
"""
import sys
import os
# Add paths
current_dir = os.path.dirname(os.path.abspath(__file__))
app_dir = os.path.join(current_dir, 'app')
sys.path.insert(0, current_dir)
sys.path.insert(0, app_dir)
# Initialize HuggingFace persistent storage
print("=" * 60)
print("🔧 INITIALIZING HUGGINGFACE STORAGE...")
print("=" * 60)
try:
from app.hf_storage import storage
print("=" * 60)
print("✅ PERSISTENT STORAGE INITIALIZED - DATABASES LOADED!")
print("=" * 60)
except Exception as e:
print("=" * 60)
print(f"❌ STORAGE INITIALIZATION FAILED: {e}")
print(" Data will not persist across restarts!")
print("=" * 60)
import traceback
traceback.print_exc()
# Execute the main GUI module
exec(open(os.path.join(app_dir, 'data_entry_gui.py')).read())