Spaces:
Build error
Build error
Download app.py from Lawrencelv/AIAnalystAgent: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/Lawrencelv/AIAnalystAgent/resolve/main/app.py
- Command line
-
hf download hf://spaces/Lawrencelv/AIAnalystAgent/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Lawrencelv/AIAnalystAgent/resolve/main/app.py
549 Bytes
| import gradio as gr | |
| from frontend import ui_user, ui_admin | |
| def main(): | |
| with gr.Blocks(title="AI Analyst Agent") as demo: | |
| is_admin = gr.State(value=False) | |
| with gr.Tab("用户入口"): | |
| gr.Markdown("## 🎯 用户分析工具界面") | |
| ui_user.render_user_ui() | |
| with gr.Tab("管理员入口"): | |
| gr.Markdown("## 🔐 管理员控制台") | |
| ui_admin.render_admin_ui(is_admin) # ✅ 已封装完整的登录与控制逻辑 | |
| demo.launch() | |
| if __name__ == "__main__": | |
| main() | |