Fix dependency issues - use simpler Gradio app
Browse files
app.py
CHANGED
|
@@ -1,150 +1,159 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
| 3 |
-
from datasets import load_dataset
|
| 4 |
import json
|
| 5 |
-
import plotly.express as px
|
| 6 |
-
import plotly.graph_objects as go
|
| 7 |
from datetime import datetime
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
|
| 12 |
try:
|
| 13 |
-
|
| 14 |
-
return
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
-
# π ModelAtlas Community Overview
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
- π
**Latest Analysis**: {latest_date[:10] if latest_date != 'Unknown' else 'Unknown'}
|
| 37 |
-
- π₯ **Contributors**: Coming soon
|
| 38 |
|
| 39 |
-
|
| 40 |
-
'''
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
return gr.DataFrame(pd.DataFrame({'message': ['No models available yet']}))
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
-
def
|
| 62 |
-
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
-
return gr.Markdown("## Analytics will appear when data is available")
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
y=org_counts.values,
|
| 73 |
-
title="Models by Organization",
|
| 74 |
-
labels={'x': 'Organization', 'y': 'Model Count'}
|
| 75 |
-
)
|
| 76 |
-
return gr.Plot(fig)
|
| 77 |
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
| 81 |
-
return gr.Markdown('''
|
| 82 |
-
# π Access Control System
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
-
|
| 89 |
-
- View basic architectural data
|
| 90 |
-
- Access model comparisons and trends
|
| 91 |
-
- No ablation/intervention access
|
| 92 |
|
| 93 |
-
|
| 94 |
-
- **Requirements**: 3+ contributions, 0.8+ quality score, 7+ days active
|
| 95 |
-
- **Access**: Basic intervention mapping
|
| 96 |
-
- **Elevation**: Automatic
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
4. Submit analyses: `python atlas.py contribute --submit`
|
| 109 |
-
5. Earn access through quality contributions!
|
| 110 |
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
python atlas.py contribute --request-access contributor
|
| 116 |
-
python atlas.py contribute --request-access heretic
|
| 117 |
-
```
|
| 118 |
-
''')
|
| 119 |
|
| 120 |
-
# Create the
|
| 121 |
-
with gr.Blocks(title="ModelAtlas Community Dashboard"
|
| 122 |
-
gr.Markdown(
|
| 123 |
# πΊοΈ ModelAtlas Community Dashboard
|
| 124 |
|
| 125 |
**Collaborative Intelligence for AI Model Architecture Analysis**
|
| 126 |
|
| 127 |
-
Welcome to the ModelAtlas community! This dashboard
|
| 128 |
-
community-contributed model analyses
|
| 129 |
-
|
| 130 |
|
| 131 |
with gr.Tabs():
|
| 132 |
-
with gr.
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
with gr.TabItem("ποΈ Models"):
|
| 136 |
-
models_content = create_models_tab()
|
| 137 |
|
| 138 |
-
with gr.
|
| 139 |
-
|
| 140 |
|
| 141 |
-
with gr.
|
| 142 |
-
|
| 143 |
|
| 144 |
-
gr.Markdown(
|
| 145 |
---
|
| 146 |
-
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
if __name__ == "__main__":
|
| 150 |
-
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import pandas as pd
|
|
|
|
| 3 |
import json
|
|
|
|
|
|
|
| 4 |
from datetime import datetime
|
| 5 |
|
| 6 |
+
# Simplified version to avoid dependency issues
|
| 7 |
+
def create_overview():
|
| 8 |
+
"""Create overview content."""
|
| 9 |
try:
|
| 10 |
+
# For now, return static content until dataset is populated
|
| 11 |
+
return """
|
| 12 |
+
# πΊοΈ ModelAtlas Community Dashboard
|
| 13 |
+
|
| 14 |
+
**Status**: System is live and ready for contributions!
|
| 15 |
+
|
| 16 |
+
## π Getting Started
|
| 17 |
+
|
| 18 |
+
This dashboard will show community analytics once model analyses are submitted.
|
| 19 |
+
|
| 20 |
+
### π How to Contribute
|
| 21 |
|
| 22 |
+
1. **Install ModelAtlas CLI**:
|
| 23 |
+
```bash
|
| 24 |
+
git clone https://github.com/your-org/ModelAtlas
|
| 25 |
+
cd ModelAtlas
|
| 26 |
+
```
|
| 27 |
|
| 28 |
+
2. **Setup contribution**:
|
| 29 |
+
```bash
|
| 30 |
+
python atlas.py contribute --setup
|
| 31 |
+
```
|
| 32 |
|
| 33 |
+
3. **Analyze and submit models**:
|
| 34 |
+
```bash
|
| 35 |
+
python model_test.py model/name
|
| 36 |
+
python atlas.py contribute --submit
|
| 37 |
+
```
|
| 38 |
|
| 39 |
+
### π Access Levels
|
|
|
|
| 40 |
|
| 41 |
+
- **PUBLIC**: View architectural insights
|
| 42 |
+
- **CONTRIBUTOR**: Access intervention mapping (3+ contributions)
|
| 43 |
+
- **HERETIC**: Full ablation research access (10+ contributions + approval)
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
## π Coming Soon
|
|
|
|
| 46 |
|
| 47 |
+
- Community model browser
|
| 48 |
+
- Innovation timeline analytics
|
| 49 |
+
- Cross-organizational insights
|
| 50 |
+
- Technique adoption tracking
|
| 51 |
|
| 52 |
+
---
|
| 53 |
|
| 54 |
+
**Ready to contribute?** Join the ModelAtlas community and help build collaborative AI research intelligence!
|
| 55 |
+
"""
|
| 56 |
+
except Exception as e:
|
| 57 |
+
return f"Loading... (System initializing: {str(e)})"
|
| 58 |
+
|
| 59 |
+
def create_models_browser():
|
| 60 |
+
"""Create models browser content."""
|
| 61 |
+
return """
|
| 62 |
+
# ποΈ Model Browser
|
| 63 |
|
| 64 |
+
The community model browser will appear here once contributions are submitted.
|
|
|
|
| 65 |
|
| 66 |
+
**What you'll see:**
|
| 67 |
+
- Community-contributed model analyses
|
| 68 |
+
- Architectural comparisons
|
| 69 |
+
- Technique evolution tracking
|
| 70 |
+
- Cross-organizational insights
|
| 71 |
|
| 72 |
+
**Current Status**: Waiting for first contributions to populate the dataset.
|
| 73 |
+
"""
|
| 74 |
|
| 75 |
+
def create_access_info():
|
| 76 |
+
"""Create access control information."""
|
| 77 |
+
return """
|
| 78 |
+
# π Access Control System
|
| 79 |
|
| 80 |
+
ModelAtlas implements responsible tiered access for ablation research:
|
|
|
|
| 81 |
|
| 82 |
+
## π PUBLIC Access
|
| 83 |
+
- β
View model architectures
|
| 84 |
+
- β
Compare model configurations
|
| 85 |
+
- β
Analyze technique adoption
|
| 86 |
+
- β No ablation/intervention access
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
+
## π CONTRIBUTOR Access
|
| 89 |
+
- β
All public features
|
| 90 |
+
- β
Basic intervention mapping
|
| 91 |
+
- β
Ablation compatibility analysis
|
| 92 |
|
| 93 |
+
**Requirements**: 3+ contributions, 0.8+ quality score, 7+ days active
|
|
|
|
|
|
|
| 94 |
|
| 95 |
+
## π₯ HERETIC Access
|
| 96 |
+
- β
All contributor features
|
| 97 |
+
- β
Advanced ablation strategies
|
| 98 |
+
- β
Cross-model transfer analysis
|
| 99 |
+
- β
Strategic research methodologies
|
| 100 |
|
| 101 |
+
**Requirements**: 10+ contributions, 0.9+ quality score, manual approval + community vouching
|
| 102 |
|
| 103 |
+
## π‘οΈ Why Access Control?
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
+
Ablation techniques are powerful research tools that require responsible handling:
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
+
- **Protects Innovation**: Keeps sensitive research within trusted community
|
| 108 |
+
- **Rewards Quality**: Contributors earn access through meaningful work
|
| 109 |
+
- **Builds Trust**: Community vouching creates networks of trusted researchers
|
| 110 |
+
- **Enables Progress**: Heretic community can advance boundaries responsibly
|
| 111 |
|
| 112 |
+
## π Getting Started
|
| 113 |
|
| 114 |
+
```bash
|
| 115 |
+
# Check your current access level
|
| 116 |
+
python atlas.py contribute --status
|
|
|
|
|
|
|
| 117 |
|
| 118 |
+
# Request access upgrade
|
| 119 |
+
python atlas.py contribute --request-access contributor
|
| 120 |
+
python atlas.py contribute --request-access heretic
|
| 121 |
+
```
|
| 122 |
|
| 123 |
+
Ready to join the community? Start contributing quality analyses today!
|
| 124 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
+
# Create the interface
|
| 127 |
+
with gr.Blocks(title="ModelAtlas Community Dashboard") as demo:
|
| 128 |
+
gr.Markdown("""
|
| 129 |
# πΊοΈ ModelAtlas Community Dashboard
|
| 130 |
|
| 131 |
**Collaborative Intelligence for AI Model Architecture Analysis**
|
| 132 |
|
| 133 |
+
Welcome to the ModelAtlas community platform! This dashboard aggregates insights from
|
| 134 |
+
community-contributed model analyses with tiered access control for responsible research.
|
| 135 |
+
""")
|
| 136 |
|
| 137 |
with gr.Tabs():
|
| 138 |
+
with gr.Tab("π Overview"):
|
| 139 |
+
overview_md = gr.Markdown(create_overview())
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
+
with gr.Tab("ποΈ Models"):
|
| 142 |
+
models_md = gr.Markdown(create_models_browser())
|
| 143 |
|
| 144 |
+
with gr.Tab("π Access & Contributing"):
|
| 145 |
+
access_md = gr.Markdown(create_access_info())
|
| 146 |
|
| 147 |
+
gr.Markdown("""
|
| 148 |
---
|
| 149 |
+
|
| 150 |
+
**Links:**
|
| 151 |
+
- π Dataset: [RadicalNotionAI/modelatlas-community](https://huggingface.co/datasets/RadicalNotionAI/modelatlas-community)
|
| 152 |
+
- π Dashboard: [RadicalNotionAI/modelatlas-dashboard](https://huggingface.co/spaces/RadicalNotionAI/modelatlas-dashboard)
|
| 153 |
+
- π» CLI Tool: [ModelAtlas GitHub](https://github.com/your-org/ModelAtlas)
|
| 154 |
+
|
| 155 |
+
*Built with ModelAtlas - Architectural Intelligence for AI Research*
|
| 156 |
+
""")
|
| 157 |
|
| 158 |
if __name__ == "__main__":
|
| 159 |
+
demo.launch()
|