cryptic / run_ui.py
vlbandara's picture
Upload folder using huggingface_hub
eb27803 verified
#!/usr/bin/env python3
"""
CrypticAI - Bitcoin Trading Dashboard
Run this script to start the Gradio UI for the CrypticAI Bitcoin Trading Dashboard.
"""
import os
import sys
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Check for required API keys
if not os.getenv("OPENAI_API_KEY"):
print("Error: OPENAI_API_KEY not found in environment variables")
print("Please set up your .env file with the required API keys")
sys.exit(1)
if not os.getenv("ALPACA_API_KEY") or not os.getenv("ALPACA_API_SECRET"):
print("Error: ALPACA_API_KEY or ALPACA_API_SECRET not found in environment variables")
print("Please set up your .env file with the required Alpaca API keys")
sys.exit(1)
# Import and run the Gradio app
from src.ui.app import app
if __name__ == "__main__":
print("=" * 80)
print("CrypticAI - Bitcoin Trading Dashboard")
print("=" * 80)
print("Starting Gradio UI...")
# Ensure results directory exists
os.makedirs("results", exist_ok=True)
# Launch the app
app.launch(share=False)