Spaces:
Running
Running
admin commited on
Commit ·
dffcd56
1
Parent(s): be7dc41
Auto sync at 2026-05-06 13:47:32
Browse files- modules/deepseek.py +20 -17
modules/deepseek.py
CHANGED
|
@@ -99,20 +99,23 @@ def predict(msg, history, prompt, temper, max_tokens, top_k, repeat_penalty, top
|
|
| 99 |
|
| 100 |
|
| 101 |
def DeepSeek_R1_Qwen_7B():
|
| 102 |
-
with gr.
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
|
| 101 |
def DeepSeek_R1_Qwen_7B():
|
| 102 |
+
with gr.Blocks() as dpsk:
|
| 103 |
+
with gr.Accordion(label=_L("⚙️ 参数设置"), open=False) as ds_acc:
|
| 104 |
+
prompt = gr.Textbox(
|
| 105 |
+
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 106 |
+
label=_L("系统提示词"),
|
| 107 |
+
)
|
| 108 |
+
temper = gr.Slider(0, 1, 0.6, label=_L("温度参数"))
|
| 109 |
+
maxtoken = gr.Slider(0, 32000, 10000, label=_L("最大 token 数"))
|
| 110 |
+
topk = gr.Slider(1, 80, 40, label=_L("Top-K 采样"))
|
| 111 |
+
repet = gr.Slider(0, 2, 1.1, label=_L("重复性惩罚"))
|
| 112 |
+
topp = gr.Slider(0, 1, 0.95, label=_L("Top-P 采样"))
|
| 113 |
+
|
| 114 |
+
gr.ChatInterface(
|
| 115 |
+
predict,
|
| 116 |
+
description=DESCRIPTION,
|
| 117 |
+
additional_inputs_accordion=ds_acc,
|
| 118 |
+
additional_inputs=[prompt, temper, maxtoken, topk, repet, topp],
|
| 119 |
+
).queue()
|
| 120 |
+
|
| 121 |
+
return dpsk
|