Spaces:
Sleeping
Sleeping
| import sys | |
| import os | |
| # Add the current directory to sys.path | |
| sys.path.append(os.getcwd()) | |
| try: | |
| print("Testing imports...") | |
| import gradio as gr | |
| import torch | |
| import spaces | |
| import talib | |
| from core.data import load_data | |
| from core.train_eval import train_and_evaluate | |
| print("Imports successful!") | |
| print("Verifying Zero GPU decorator...") | |
| # Check if train_and_evaluate has the spaces decorator | |
| if hasattr(train_and_evaluate, "__wrapped__"): | |
| print("Zero GPU decorator detected on train_and_evaluate.") | |
| else: | |
| print("Warning: Zero GPU decorator NOT detected on train_and_evaluate.") | |
| print("Startup test passed!") | |
| sys.exit(0) | |
| except Exception as e: | |
| print(f"Startup test failed with error: {e}") | |
| import traceback | |
| traceback.print_exc() | |
| sys.exit(1) | |