import os import gc from flask import Flask, request, jsonify, render_template_string from flask_cors import CORS from brain import MairaBrain app = Flask(__name__) CORS(app) # --- Configuration for the 5 Neural Cores --- MODELS = { "small": {"repo": "CyberCoder225/maira-model", "file": "SmolLM2-360M-Instruct.Q4_K_M.gguf"}, "medium": {"repo": "bartowski/Llama-3.2-1B-Instruct-GGUF", "file": "Llama-3.2-1B-Instruct-Q4_K_M.gguf"}, "qwen": {"repo": "Qwen/Qwen2.5-1.5B-Instruct-GGUF", "file": "qwen2.5-1.5b-instruct-q4_k_m.gguf"}, "danube": {"repo": "h2oai/h2o-danube3-500m-chat-GGUF", "file": "h2o-danube3-500m-chat-Q4_K_M.gguf"}, "granite": {"repo": "bartowski/granite-3.0-2b-instruct-GGUF", "file": "granite-3.0-2b-instruct-Q4_K_M.gguf"} } # --- Initialize Neural Core Registry --- print("🌌 Loading Neural Core Registry...") cores = {name: MairaBrain(cfg["repo"], cfg["file"]) for name, cfg in MODELS.items()} # --- EMBEDDED HTML (No more templates folder needed!) --- HTML_UI = """
Owner: CyberCoder225