Spaces:
Runtime error

File size: 1,714 Bytes
ce06eb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85eba4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: 数据指标建模师
emoji: 📊
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: "1.39.0"
python_version: "3.11"
app_file: app.py
pinned: false
---

# 数据指标建模师 (Data Metrics Modeler)

AI-powered data metrics modeling tool with 3-step workflow:
1. **需求理解** - Extract structured requirements from natural language input
2. **指标推荐** - Recommend relevant indicators using RAG + vector similarity
3. **建模生成** - Generate SQL DDL, table structures, and data dictionary

## 🚀 Demo

This app is configured for **Mock Mode** (no API key required for demonstration).

## 📦 Features

- ✅ Natural language requirement understanding
- ✅ Intelligent indicator recommendation (60+ indicators across retail/e-commerce/finance)
- ✅ Automatic SQL DDL generation
- ✅ Dimension & fact table design
- ✅ Data dictionary generation
- ✅ Downloadable scheme package (.zip)

## 🛠️ Tech Stack

- **Frontend**: Streamlit 1.39+
- **Vector DB**: FAISS CPU
- **Embeddings**: SentenceTransformers (multilingual MiniLM)
- **Mock Mode**: Preset responses, no API needed for demo

## 🔧 Configuration

Edit `config/settings.py`:
- `MOCK_MODE = True` - Use mock data (default, no API needed)
- `MOCK_MODE = False` - Use real DeepSeek API (set `DEEPSEEK_API_KEY`)

## 📝 Usage

1. Enter business requirement (Chinese or English)
2. Click "理解需求" to extract structured info
3. Click "推荐指标" to see recommended indicators
4. Select indicators and click "生成建模"
5. Download the complete scheme package (.zip)

## 🌐 Deployment

This app is deployed on Hugging Face Spaces with Streamlit.
# 触发 HF Spaces 重建 - Sun May 17 03:55:32     2026