Spaces:
Running on Zero
Running on Zero
zhang commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,21 @@
|
|
| 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.
|
| 12 |
-
gr.
|
| 13 |
-
gr.
|
| 14 |
-
|
| 15 |
|
| 16 |
-
#
|
| 17 |
load_model()
|
| 18 |
|
|
|
|
| 19 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import spaces
|
| 3 |
|
|
|
|
| 4 |
@spaces.GPU
|
| 5 |
def load_model():
|
| 6 |
+
# 这里是加载原厂模型(注释中文没问题)
|
| 7 |
return gr.load("models/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B")
|
| 8 |
|
| 9 |
+
# 构建界面
|
| 10 |
with gr.Blocks(fill_height=True) as demo:
|
| 11 |
with gr.Sidebar():
|
| 12 |
+
gr.Markdown("# 🚀 OpenIPOS Global")
|
| 13 |
+
gr.Markdown("### 专利级满血算力演示站")
|
| 14 |
+
gr.Markdown("本节点由 OpenIPOS 运营,提供满血推理能力。")
|
| 15 |
+
gr.LoginButton("Sign in")
|
| 16 |
|
| 17 |
+
# 执行模型加载
|
| 18 |
load_model()
|
| 19 |
|
| 20 |
+
# 去掉了末尾可能引起误会的逗号
|
| 21 |
demo.launch()
|