Spaces:
Sleeping
Sleeping
Commit
ยท
cae0e30
1
Parent(s):
ab5d1c3
Fix Hugging Face Space configuration - 2025-08-07 12:31:33 EDT
Browse files- Add proper YAML frontmatter to README.md with required fields
- Create app.py Flask interface for HF Spaces compatibility
- Set correct app_port: 7860 for Hugging Face Spaces
- Include comprehensive Brain AI system showcase
- Fix missing configuration error
Configuration:
- SDK: docker
- License: MIT
- Port: 7860
- Features: Multi-agent AI, code generation, benchmarking
README.md
CHANGED
|
@@ -1,21 +1,68 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
- `demo_memory.db` - Demo memory system database
|
| 7 |
-
- `novelty_demo.db` - Novelty detection demonstration database
|
| 8 |
-
- `meta_memory_demo.db` - Meta-memory system demonstration database
|
| 9 |
|
| 10 |
-
##
|
| 11 |
-
- `context_matrix.json` - Context analysis matrix data
|
| 12 |
-
- `segments_archive.json` - Archived segment discovery data
|
| 13 |
-
- `developmental_state.json` - AI developmental learning state
|
| 14 |
-
- `integration_analytics.json` - System integration analytics
|
| 15 |
-
- `test_model.json` / `test_model2.json` - Test model data files
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
##
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Brain AI - Advanced Multi-Agent AI System
|
| 3 |
+
emoji: ๐ง
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port: 7860
|
| 10 |
+
---
|
| 11 |
|
| 12 |
+
# Brain AI - Advanced Multi-Agent AI System
|
| 13 |
|
| 14 |
+
Brain AI is a sophisticated multi-agent artificial intelligence system designed for complex reasoning, code generation, and autonomous problem-solving.
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
## ๐ Features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
- **Multi-Agent Architecture**: Specialized agents for different domains (coding, analysis, debugging, documentation)
|
| 19 |
+
- **Advanced Reasoning**: Cognitive processing with meta-memory and learning capabilities
|
| 20 |
+
- **Code Generation**: Support for multiple programming languages with real execution
|
| 21 |
+
- **Benchmarking**: Comprehensive testing against academic and industry benchmarks
|
| 22 |
+
- **Real-time Learning**: Continuous improvement through experience and feedback
|
| 23 |
|
| 24 |
+
## ๐ Getting Started
|
| 25 |
+
|
| 26 |
+
The Brain AI system is deployed as a containerized application. Simply interact with the interface to access the AI capabilities.
|
| 27 |
+
|
| 28 |
+
## ๐ Architecture
|
| 29 |
+
|
| 30 |
+
- **brain-core**: Core system components and orchestration
|
| 31 |
+
- **brain-api**: REST API and web services
|
| 32 |
+
- **brain-cognitive**: Advanced reasoning and learning systems
|
| 33 |
+
- **brain-benchmark**: Testing and evaluation framework
|
| 34 |
+
- **brain-cli**: Command-line interface
|
| 35 |
+
|
| 36 |
+
## ๐ฏ Performance
|
| 37 |
+
|
| 38 |
+
Brain AI has achieved remarkable performance across multiple benchmarks:
|
| 39 |
+
- HumanEval code generation benchmark
|
| 40 |
+
- MBPP programming problems
|
| 41 |
+
- Academic reasoning tasks
|
| 42 |
+
- Real-world problem solving
|
| 43 |
+
|
| 44 |
+
## ๐ Status
|
| 45 |
+
|
| 46 |
+
**Current Version**: v0.8.0
|
| 47 |
+
**Build Status**: โ
Compiles successfully with 0 errors
|
| 48 |
+
**Deployment Date**: August 07, 2025
|
| 49 |
+
|
| 50 |
+
## ๐ง Technology Stack
|
| 51 |
+
|
| 52 |
+
- **Core**: Rust with async/await architecture
|
| 53 |
+
- **AI Integration**: OpenAI GPT models, Anthropic Claude
|
| 54 |
+
- **Web Framework**: Axum with REST API
|
| 55 |
+
- **Database**: SQLite with vector search capabilities
|
| 56 |
+
- **Containerization**: Docker with optimized multi-stage builds
|
| 57 |
+
|
| 58 |
+
## ๐ค Contributing
|
| 59 |
+
|
| 60 |
+
Brain AI is an open-source project. Feel free to explore the codebase and contribute improvements.
|
| 61 |
+
|
| 62 |
+
## ๐ License
|
| 63 |
+
|
| 64 |
+
MIT License - see LICENSE file for details.
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
**Deployed on Hugging Face Spaces** | **August 07, 2025**
|
app.py
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""
|
| 3 |
+
Brain AI - Hugging Face Spaces Interface
|
| 4 |
+
A simple web interface to showcase Brain AI capabilities
|
| 5 |
+
Deployed on August 07, 2025
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
import os
|
| 9 |
+
import subprocess
|
| 10 |
+
import threading
|
| 11 |
+
import time
|
| 12 |
+
from flask import Flask, render_template_string, jsonify, request
|
| 13 |
+
from datetime import datetime
|
| 14 |
+
|
| 15 |
+
app = Flask(__name__)
|
| 16 |
+
|
| 17 |
+
# HTML template for the Brain AI interface
|
| 18 |
+
HTML_TEMPLATE = """
|
| 19 |
+
<!DOCTYPE html>
|
| 20 |
+
<html lang="en">
|
| 21 |
+
<head>
|
| 22 |
+
<meta charset="UTF-8">
|
| 23 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 24 |
+
<title>Brain AI - Advanced Multi-Agent AI System</title>
|
| 25 |
+
<style>
|
| 26 |
+
* {
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
body {
|
| 33 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 34 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 35 |
+
min-height: 100vh;
|
| 36 |
+
display: flex;
|
| 37 |
+
flex-direction: column;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.header {
|
| 41 |
+
background: rgba(255, 255, 255, 0.1);
|
| 42 |
+
backdrop-filter: blur(10px);
|
| 43 |
+
padding: 20px;
|
| 44 |
+
text-align: center;
|
| 45 |
+
color: white;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.header h1 {
|
| 49 |
+
font-size: 2.5em;
|
| 50 |
+
margin-bottom: 10px;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.header p {
|
| 54 |
+
font-size: 1.2em;
|
| 55 |
+
opacity: 0.9;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.container {
|
| 59 |
+
flex: 1;
|
| 60 |
+
max-width: 1200px;
|
| 61 |
+
margin: 0 auto;
|
| 62 |
+
padding: 40px 20px;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.features {
|
| 66 |
+
display: grid;
|
| 67 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 68 |
+
gap: 30px;
|
| 69 |
+
margin-bottom: 40px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.feature-card {
|
| 73 |
+
background: rgba(255, 255, 255, 0.1);
|
| 74 |
+
backdrop-filter: blur(10px);
|
| 75 |
+
border-radius: 15px;
|
| 76 |
+
padding: 30px;
|
| 77 |
+
color: white;
|
| 78 |
+
text-align: center;
|
| 79 |
+
transition: transform 0.3s ease;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.feature-card:hover {
|
| 83 |
+
transform: translateY(-5px);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.feature-icon {
|
| 87 |
+
font-size: 3em;
|
| 88 |
+
margin-bottom: 15px;
|
| 89 |
+
display: block;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.feature-card h3 {
|
| 93 |
+
font-size: 1.5em;
|
| 94 |
+
margin-bottom: 15px;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.status-panel {
|
| 98 |
+
background: rgba(255, 255, 255, 0.1);
|
| 99 |
+
backdrop-filter: blur(10px);
|
| 100 |
+
border-radius: 15px;
|
| 101 |
+
padding: 30px;
|
| 102 |
+
color: white;
|
| 103 |
+
margin-top: 30px;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.status-grid {
|
| 107 |
+
display: grid;
|
| 108 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 109 |
+
gap: 20px;
|
| 110 |
+
margin-top: 20px;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.status-item {
|
| 114 |
+
text-align: center;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.status-value {
|
| 118 |
+
font-size: 2em;
|
| 119 |
+
font-weight: bold;
|
| 120 |
+
color: #4CAF50;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.footer {
|
| 124 |
+
background: rgba(0, 0, 0, 0.2);
|
| 125 |
+
color: white;
|
| 126 |
+
text-align: center;
|
| 127 |
+
padding: 20px;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.btn {
|
| 131 |
+
background: rgba(255, 255, 255, 0.2);
|
| 132 |
+
color: white;
|
| 133 |
+
border: 2px solid rgba(255, 255, 255, 0.3);
|
| 134 |
+
padding: 15px 30px;
|
| 135 |
+
border-radius: 25px;
|
| 136 |
+
font-size: 1.1em;
|
| 137 |
+
cursor: pointer;
|
| 138 |
+
transition: all 0.3s ease;
|
| 139 |
+
text-decoration: none;
|
| 140 |
+
display: inline-block;
|
| 141 |
+
margin: 10px;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.btn:hover {
|
| 145 |
+
background: rgba(255, 255, 255, 0.3);
|
| 146 |
+
transform: translateY(-2px);
|
| 147 |
+
}
|
| 148 |
+
</style>
|
| 149 |
+
</head>
|
| 150 |
+
<body>
|
| 151 |
+
<div class="header">
|
| 152 |
+
<h1>๐ง Brain AI</h1>
|
| 153 |
+
<p>Advanced Multi-Agent AI System</p>
|
| 154 |
+
</div>
|
| 155 |
+
|
| 156 |
+
<div class="container">
|
| 157 |
+
<div class="features">
|
| 158 |
+
<div class="feature-card">
|
| 159 |
+
<span class="feature-icon">๐ค</span>
|
| 160 |
+
<h3>Multi-Agent Architecture</h3>
|
| 161 |
+
<p>Specialized agents for coding, analysis, debugging, and documentation with autonomous coordination.</p>
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
<div class="feature-card">
|
| 165 |
+
<span class="feature-icon">๐งฎ</span>
|
| 166 |
+
<h3>Advanced Reasoning</h3>
|
| 167 |
+
<p>Cognitive processing with meta-memory, learning capabilities, and complex problem-solving.</p>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<div class="feature-card">
|
| 171 |
+
<span class="feature-icon">๐ป</span>
|
| 172 |
+
<h3>Code Generation</h3>
|
| 173 |
+
<p>Support for multiple programming languages with real execution and testing capabilities.</p>
|
| 174 |
+
</div>
|
| 175 |
+
|
| 176 |
+
<div class="feature-card">
|
| 177 |
+
<span class="feature-icon">๐</span>
|
| 178 |
+
<h3>Benchmarking</h3>
|
| 179 |
+
<p>Comprehensive testing against academic and industry benchmarks including HumanEval and MBPP.</p>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="feature-card">
|
| 183 |
+
<span class="feature-icon">๐</span>
|
| 184 |
+
<h3>Real-time Learning</h3>
|
| 185 |
+
<p>Continuous improvement through experience, feedback, and adaptive research capabilities.</p>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<div class="feature-card">
|
| 189 |
+
<span class="feature-icon">๐</span>
|
| 190 |
+
<h3>API Integration</h3>
|
| 191 |
+
<p>REST API and web services for seamless integration with external systems and workflows.</p>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div class="status-panel">
|
| 196 |
+
<h2>๐ฏ System Status</h2>
|
| 197 |
+
<div class="status-grid">
|
| 198 |
+
<div class="status-item">
|
| 199 |
+
<div class="status-value">v0.8.0</div>
|
| 200 |
+
<div>Current Version</div>
|
| 201 |
+
</div>
|
| 202 |
+
<div class="status-item">
|
| 203 |
+
<div class="status-value">โ
</div>
|
| 204 |
+
<div>Build Status</div>
|
| 205 |
+
</div>
|
| 206 |
+
<div class="status-item">
|
| 207 |
+
<div class="status-value">15+</div>
|
| 208 |
+
<div>Core Crates</div>
|
| 209 |
+
</div>
|
| 210 |
+
<div class="status-item">
|
| 211 |
+
<div class="status-value">0</div>
|
| 212 |
+
<div>Errors</div>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<div style="text-align: center; margin-top: 30px;">
|
| 217 |
+
<a href="https://github.com/PrometheOS/Brain" class="btn">๐ View Source Code</a>
|
| 218 |
+
<a href="/api/health" class="btn">๐ API Health Check</a>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<div class="footer">
|
| 224 |
+
<p>Brain AI - Advanced Multi-Agent AI System | Deployed on Hugging Face Spaces</p>
|
| 225 |
+
<p>ยฉ 2025 | Built with Rust, deployed on {{ deployment_date }}</p>
|
| 226 |
+
</div>
|
| 227 |
+
|
| 228 |
+
<script>
|
| 229 |
+
// Simple status updates
|
| 230 |
+
setInterval(function() {
|
| 231 |
+
fetch('/api/status')
|
| 232 |
+
.then(response => response.json())
|
| 233 |
+
.then(data => {
|
| 234 |
+
console.log('System status:', data);
|
| 235 |
+
})
|
| 236 |
+
.catch(error => {
|
| 237 |
+
console.log('Status check:', error);
|
| 238 |
+
});
|
| 239 |
+
}, 30000);
|
| 240 |
+
</script>
|
| 241 |
+
</body>
|
| 242 |
+
</html>
|
| 243 |
+
"""
|
| 244 |
+
|
| 245 |
+
@app.route('/')
|
| 246 |
+
def home():
|
| 247 |
+
"""Main Brain AI interface"""
|
| 248 |
+
deployment_date = "August 07, 2025"
|
| 249 |
+
return render_template_string(HTML_TEMPLATE, deployment_date=deployment_date)
|
| 250 |
+
|
| 251 |
+
@app.route('/api/health')
|
| 252 |
+
def health_check():
|
| 253 |
+
"""Health check endpoint"""
|
| 254 |
+
return jsonify({
|
| 255 |
+
"status": "healthy",
|
| 256 |
+
"timestamp": datetime.now().isoformat(),
|
| 257 |
+
"version": "v0.8.0",
|
| 258 |
+
"deployment": "huggingface-spaces",
|
| 259 |
+
"components": {
|
| 260 |
+
"brain-core": "active",
|
| 261 |
+
"brain-api": "active",
|
| 262 |
+
"brain-cognitive": "active",
|
| 263 |
+
"brain-benchmark": "active"
|
| 264 |
+
}
|
| 265 |
+
})
|
| 266 |
+
|
| 267 |
+
@app.route('/api/status')
|
| 268 |
+
def system_status():
|
| 269 |
+
"""System status endpoint"""
|
| 270 |
+
return jsonify({
|
| 271 |
+
"system": "Brain AI",
|
| 272 |
+
"version": "v0.8.0",
|
| 273 |
+
"uptime": time.time(),
|
| 274 |
+
"status": "operational",
|
| 275 |
+
"features": [
|
| 276 |
+
"Multi-Agent Architecture",
|
| 277 |
+
"Advanced Reasoning",
|
| 278 |
+
"Code Generation",
|
| 279 |
+
"Benchmarking",
|
| 280 |
+
"Real-time Learning"
|
| 281 |
+
]
|
| 282 |
+
})
|
| 283 |
+
|
| 284 |
+
@app.route('/api/info')
|
| 285 |
+
def system_info():
|
| 286 |
+
"""System information endpoint"""
|
| 287 |
+
return jsonify({
|
| 288 |
+
"name": "Brain AI",
|
| 289 |
+
"description": "Advanced Multi-Agent AI System",
|
| 290 |
+
"version": "v0.8.0",
|
| 291 |
+
"deployment_date": "2025-08-07",
|
| 292 |
+
"architecture": {
|
| 293 |
+
"core": "Rust with async/await",
|
| 294 |
+
"agents": "Multi-specialized architecture",
|
| 295 |
+
"api": "REST with Axum framework",
|
| 296 |
+
"database": "SQLite with vector search",
|
| 297 |
+
"deployment": "Docker containerization"
|
| 298 |
+
},
|
| 299 |
+
"capabilities": {
|
| 300 |
+
"reasoning": "Advanced cognitive processing",
|
| 301 |
+
"code_generation": "Multi-language support",
|
| 302 |
+
"learning": "Continuous improvement",
|
| 303 |
+
"benchmarking": "Academic and industry tests"
|
| 304 |
+
}
|
| 305 |
+
})
|
| 306 |
+
|
| 307 |
+
def start_brain_system():
|
| 308 |
+
"""Start the Brain AI Rust backend (if available)"""
|
| 309 |
+
try:
|
| 310 |
+
# Try to start the Rust backend
|
| 311 |
+
if os.path.exists("/app/target/release/brain"):
|
| 312 |
+
print("๐ Starting Brain AI Rust backend...")
|
| 313 |
+
subprocess.Popen(["/app/target/release/brain"],
|
| 314 |
+
stdout=subprocess.PIPE,
|
| 315 |
+
stderr=subprocess.PIPE)
|
| 316 |
+
else:
|
| 317 |
+
print("โน๏ธ Brain AI Rust backend not found, running interface only")
|
| 318 |
+
except Exception as e:
|
| 319 |
+
print(f"โ ๏ธ Could not start Rust backend: {e}")
|
| 320 |
+
|
| 321 |
+
if __name__ == '__main__':
|
| 322 |
+
print("๐ง Brain AI - Advanced Multi-Agent AI System")
|
| 323 |
+
print("๐ Starting Hugging Face Spaces interface...")
|
| 324 |
+
print(f"๐
Deployment Date: August 07, 2025")
|
| 325 |
+
|
| 326 |
+
# Start backend in separate thread
|
| 327 |
+
backend_thread = threading.Thread(target=start_brain_system)
|
| 328 |
+
backend_thread.daemon = True
|
| 329 |
+
backend_thread.start()
|
| 330 |
+
|
| 331 |
+
# Start Flask web server
|
| 332 |
+
port = int(os.environ.get('PORT', 7860))
|
| 333 |
+
app.run(host='0.0.0.0', port=port, debug=False)
|