Spaces:
Running on Zero
Running on Zero
zhang commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,19 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
with gr.Blocks(fill_height=True) as demo:
|
| 4 |
with gr.Sidebar():
|
| 5 |
-
gr.
|
| 6 |
-
gr.
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
+
|
| 4 |
+
# 这是关键!告诉 HF 这个加载动作需要用到 ZeroGPU 算力
|
| 5 |
+
@spaces.GPU
|
| 6 |
+
def load_model():
|
| 7 |
+
return gr.load("models/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B")
|
| 8 |
|
| 9 |
with gr.Blocks(fill_height=True) as demo:
|
| 10 |
with gr.Sidebar():
|
| 11 |
+
gr.markdown("# 🚀 OpenIPOS Global")
|
| 12 |
+
gr.markdown("### 专利级满血算力演示站")
|
| 13 |
+
gr.markdown("本节点由 OpenIPOS 运营,提供 DeepSeek-R1 32B 完整推理能力,支持超长上下文逻辑分析。")
|
| 14 |
+
button = gr.LoginButton("登录以开始体验")
|
| 15 |
|
| 16 |
+
# 这里的 load 也要包在 GPU 环境里
|
| 17 |
+
load_model()
|
| 18 |
+
|
| 19 |
demo.launch()
|