File size: 902 Bytes
05846b4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | """
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())
|