Spaces:
Running
Running
admin
commited on
Commit
·
f9eefb4
1
Parent(s):
ff6ae8e
fix ds acc
Browse files- deepseek.py +14 -14
deepseek.py
CHANGED
|
@@ -75,21 +75,21 @@ def predict(
|
|
| 75 |
yield "".join(outputs)
|
| 76 |
|
| 77 |
|
| 78 |
-
def DeepSeek_R1_Qwen_7B():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
return gr.ChatInterface(
|
| 80 |
predict,
|
| 81 |
-
title=f"{MODEL_NAME} Deployment Instance",
|
| 82 |
description=DESCRIPTION,
|
| 83 |
-
additional_inputs_accordion=
|
| 84 |
-
additional_inputs=[
|
| 85 |
-
gr.Textbox(
|
| 86 |
-
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 87 |
-
label="System prompt",
|
| 88 |
-
),
|
| 89 |
-
gr.Slider(0, 1, 0.6, label="Temperature"),
|
| 90 |
-
gr.Slider(0, 32000, 10000, label="Max new tokens"),
|
| 91 |
-
gr.Slider(1, 80, 40, label="Top K sampling"),
|
| 92 |
-
gr.Slider(0, 2, 1.1, label="Repetition penalty"),
|
| 93 |
-
gr.Slider(0, 1, 0.95, label="Top P sampling"),
|
| 94 |
-
],
|
| 95 |
).queue()
|
|
|
|
| 75 |
yield "".join(outputs)
|
| 76 |
|
| 77 |
|
| 78 |
+
def DeepSeek_R1_Qwen_7B():
|
| 79 |
+
with gr.Accordion(label="⚙️ Parameters", open=False) as ds_acc:
|
| 80 |
+
prompt = gr.Textbox(
|
| 81 |
+
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 82 |
+
label="System prompt",
|
| 83 |
+
)
|
| 84 |
+
temper = gr.Slider(0, 1, 0.6, label="Temperature")
|
| 85 |
+
maxtoken = gr.Slider(0, 32000, 10000, label="Max new tokens")
|
| 86 |
+
topk = gr.Slider(1, 80, 40, label="Top K sampling")
|
| 87 |
+
repet = gr.Slider(0, 2, 1.1, label="Repetition penalty")
|
| 88 |
+
topp = gr.Slider(0, 1, 0.95, label="Top P sampling")
|
| 89 |
+
|
| 90 |
return gr.ChatInterface(
|
| 91 |
predict,
|
|
|
|
| 92 |
description=DESCRIPTION,
|
| 93 |
+
additional_inputs_accordion=ds_acc,
|
| 94 |
+
additional_inputs=[prompt, temper, maxtoken, topk, repet, topp],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
).queue()
|