Update app.py
Browse files
app.py
CHANGED
|
@@ -15,15 +15,15 @@ css = """
|
|
| 15 |
:root { --radius: 14px; }
|
| 16 |
#topbar {
|
| 17 |
display:flex; align-items:center; justify-content:space-between;
|
|
|
|
|
|
|
| 18 |
padding:12px 16px;
|
| 19 |
background:linear-gradient(90deg,#f8fafc,#eef2ff,#e0f2fe);
|
| 20 |
color:#0f172a;
|
| 21 |
border:1px solid #e5e7eb;
|
| 22 |
border-radius: var(--radius);
|
| 23 |
box-shadow: 0 4px 14px rgba(15,23,42,.06);
|
| 24 |
-
margin
|
| 25 |
-
width: 100%;
|
| 26 |
-
box-sizing: border-box;
|
| 27 |
}
|
| 28 |
#topbar h1 { font-size:18px; margin:0; font-weight:800; letter-spacing:.5px }
|
| 29 |
#topbar .right { display:flex; gap:8px; align-items:center }
|
|
@@ -234,16 +234,11 @@ except Exception:
|
|
| 234 |
|
| 235 |
# ========== Gradio 界面 ==========
|
| 236 |
with gr.Blocks(title="模拟实盘(OKX 公共WS + 多策略引擎)", theme=theme, css=css) as demo:
|
| 237 |
-
# 顶栏放
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
gr.HTML('<div id="topbar"><h1>📈 模拟实盘控制台</h1><div class="right"><span class="badge">中文界面</span></div></div>')
|
| 241 |
-
|
| 242 |
-
# 提示文字也放进 Row,宽度与下方网格一致
|
| 243 |
-
with gr.Row():
|
| 244 |
-
with gr.Column(scale=12):
|
| 245 |
-
gr.Markdown("提示:点击“⚙️ 设置”进入配置页(上传CSV、参数加载/保存)。若后端模块缺失将自动进入演示引擎。")
|
| 246 |
|
|
|
|
| 247 |
with gr.Row():
|
| 248 |
with gr.Column(scale=7):
|
| 249 |
with gr.Group(visible=True) as 运行面板:
|
|
|
|
| 15 |
:root { --radius: 14px; }
|
| 16 |
#topbar {
|
| 17 |
display:flex; align-items:center; justify-content:space-between;
|
| 18 |
+
width: 100%;
|
| 19 |
+
box-sizing: border-box;
|
| 20 |
padding:12px 16px;
|
| 21 |
background:linear-gradient(90deg,#f8fafc,#eef2ff,#e0f2fe);
|
| 22 |
color:#0f172a;
|
| 23 |
border:1px solid #e5e7eb;
|
| 24 |
border-radius: var(--radius);
|
| 25 |
box-shadow: 0 4px 14px rgba(15,23,42,.06);
|
| 26 |
+
margin: 0 0 12px 0;
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
#topbar h1 { font-size:18px; margin:0; font-weight:800; letter-spacing:.5px }
|
| 29 |
#topbar .right { display:flex; gap:8px; align-items:center }
|
|
|
|
| 234 |
|
| 235 |
# ========== Gradio 界面 ==========
|
| 236 |
with gr.Blocks(title="模拟实盘(OKX 公共WS + 多策略引擎)", theme=theme, css=css) as demo:
|
| 237 |
+
# 顶栏和提示放在 Blocks 顶层,自动与下方内容区域等宽
|
| 238 |
+
gr.HTML('<div id="topbar"><h1>📈 模拟实盘控制台</h1><div class="right"><span class="badge">中文界面</span></div></div>')
|
| 239 |
+
gr.Markdown("提示:点击“⚙️ 设置”进入配置页(上传CSV、参数加载/保存)。若后端模块缺失将自动进入演示引擎。")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
|
| 241 |
+
# 主内容:与下方卡片一致的两列布局
|
| 242 |
with gr.Row():
|
| 243 |
with gr.Column(scale=7):
|
| 244 |
with gr.Group(visible=True) as 运行面板:
|