Spaces:
Sleeping
Sleeping
File size: 1,278 Bytes
532e19f 65591ed 532e19f 65591ed 532e19f 06adb09 88ae850 532e19f 65591ed 06adb09 88ae850 06adb09 65591ed 88ae850 65591ed 88ae850 532e19f 06672ed 532e19f e80be02 764e3d1 65591ed 88ae850 764e3d1 5bd4e9d 532e19f 5bd4e9d 65591ed e80be02 65591ed 3b5481d | 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | """
app.py β Entry point using minimal_test.py (Tabs-based navigation)
This version uses Tabs instead of Columns for better production compatibility.
"""
import os
import sys
import logging
from dotenv import load_dotenv
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(name)s: %(message)s',
handlers=[
logging.FileHandler('app.log', encoding='utf-8'),
logging.StreamHandler(sys.stdout)
]
)
logger = logging.getLogger(__name__)
# Load .env if it exists
load_dotenv()
# Apply proxy settings
if os.getenv("http_proxy"):
os.environ["http_proxy"] = os.getenv("http_proxy")
if os.getenv("https_proxy"):
os.environ["https_proxy"] = os.getenv("https_proxy")
if os.getenv("no_proxy"):
os.environ["no_proxy"] = os.getenv("no_proxy")
logger.info("π Launching Legacy Code Challenge (Original version)...")
import student_interface
demo = student_interface.demo
logger.info("β
Demo imported successfully!")
if __name__ == "__main__":
logger.info("π Launching application...")
# On HuggingFace Spaces, Gradio handles server config automatically
demo.launch(
show_error=True,
css=student_interface._CSS,
js=student_interface._JS,
)
|