Spaces:
Sleeping
Sleeping
Trae Assistant commited on
Commit ·
cbeed7a
1
Parent(s): 0b2dc60
chore: update README.md with huggingface metadata
Browse files
README.md
CHANGED
|
@@ -1,57 +1,69 @@
|
|
| 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 |
-
// Enable lint rules for React
|
| 45 |
-
reactX.configs['recommended-typescript'],
|
| 46 |
-
// Enable lint rules for React DOM
|
| 47 |
-
reactDom.configs.recommended,
|
| 48 |
-
],
|
| 49 |
-
languageOptions: {
|
| 50 |
-
// other options...
|
| 51 |
-
parserOptions: {
|
| 52 |
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
| 53 |
-
tsconfigRootDir: import.meta.dirname,
|
| 54 |
-
},
|
| 55 |
-
},
|
| 56 |
-
})
|
| 57 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: 生成式 UI Agent
|
| 3 |
+
emoji: 🎨
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
short_description: 基于 DeepSeek-V3 的 AI 驱动 UI 界面生成工具,支持中英文自然语言描述。
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# 生成式 UI Agent (Generative UI Agent)
|
| 12 |
+
|
| 13 |
+
这是一个基于 AI 大模型的智能界面生成工具,用户通过自然语言描述即可自动生成对应的前端 UI 界面代码。
|
| 14 |
+
|
| 15 |
+
## 核心功能
|
| 16 |
+
|
| 17 |
+
- **AI 对话输入**:支持中英文自然语言描述,通过硅基流 (SiliconFlow) API 调用 DeepSeek-V3 等先进模型。
|
| 18 |
+
- **实时预览与代码查看**:生成的界面代码可即时查看,并提供预览引导。
|
| 19 |
+
- **历史记录管理**:自动保存最近的生成记录,方便快速找回。
|
| 20 |
+
- **响应式设计**:生成的代码默认支持移动端和桌面端适配。
|
| 21 |
+
|
| 22 |
+
## 技术栈
|
| 23 |
+
|
| 24 |
+
- **前端**:React 18, TypeScript, Vite, Ant Design, Tailwind CSS
|
| 25 |
+
- **后端**:Node.js, Express, Axios
|
| 26 |
+
- **AI 能力**:硅基流 (SiliconFlow) API, DeepSeek-V3 模型
|
| 27 |
+
|
| 28 |
+
## 快速开始
|
| 29 |
+
|
| 30 |
+
### 1. 环境准备
|
| 31 |
+
|
| 32 |
+
确保您的系统中已安装 Node.js 和 pnpm。
|
| 33 |
+
|
| 34 |
+
### 2. 配置环境变量
|
| 35 |
+
|
| 36 |
+
在项目根目录下创建 `.env` 文件,并配置以下内容:
|
| 37 |
+
|
| 38 |
+
```env
|
| 39 |
+
SILICONFLOW_API_KEY=您的硅基流API密钥
|
| 40 |
+
SILICONFLOW_MODEL=deepseek-ai/DeepSeek-V3
|
| 41 |
+
PORT=7860
|
| 42 |
```
|
| 43 |
|
| 44 |
+
### 3. 安装依赖
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
pnpm install
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
### 4. 启动项目
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
pnpm dev
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
```
|
| 55 |
+
|
| 56 |
+
该命令将同时启动前端开发服务器(默认端口 5173)和后端 API 服务(端口 3001)。
|
| 57 |
+
|
| 58 |
+
## 项目结构
|
| 59 |
+
|
| 60 |
+
- `src/` - 前端源代码
|
| 61 |
+
- `pages/` - 页面组件
|
| 62 |
+
- `components/` - 通用组件
|
| 63 |
+
- `api/` - 后端 API 服务
|
| 64 |
+
- `routes/` - 路由处理逻辑
|
| 65 |
+
- `public/` - 静态资源
|
| 66 |
+
|
| 67 |
+
## 许可证
|
| 68 |
+
|
| 69 |
+
MIT
|