admin
commited on
Commit
·
51b4629
1
Parent(s):
55b1e92
leave only en
Browse files
app.py
CHANGED
|
@@ -57,44 +57,46 @@ def kimi(message, history, model, api_key, system_prompt):
|
|
| 57 |
|
| 58 |
if __name__ == "__main__":
|
| 59 |
with gr.Blocks() as demo: # Create Gradio interface
|
| 60 |
-
gr.Markdown("# LLM API Aggregation Deployment
|
| 61 |
with gr.Tab("DeepSeek"):
|
| 62 |
-
with gr.Accordion(label="⚙️ Settings
|
| 63 |
ds_model = gr.Dropdown(
|
| 64 |
choices=["deepseek-chat", "deepseek-reasoner"],
|
| 65 |
value="deepseek-chat",
|
| 66 |
-
label="Select a model
|
| 67 |
)
|
| 68 |
ds_key = gr.Textbox(
|
| 69 |
"",
|
| 70 |
type="password",
|
| 71 |
-
label="API key
|
| 72 |
)
|
| 73 |
ds_sys = gr.Textbox(
|
| 74 |
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 75 |
-
label="System prompt
|
| 76 |
)
|
|
|
|
| 77 |
gr.ChatInterface(
|
| 78 |
deepseek,
|
| 79 |
additional_inputs=[ds_model, ds_key, ds_sys],
|
| 80 |
)
|
| 81 |
|
| 82 |
with gr.Tab("Kimi"):
|
| 83 |
-
with gr.Accordion(label="⚙️ Settings
|
| 84 |
kimi_model = gr.Dropdown(
|
| 85 |
choices=["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"],
|
| 86 |
value="moonshot-v1-32k",
|
| 87 |
-
label="Select a model
|
| 88 |
)
|
| 89 |
kimi_key = gr.Textbox(
|
| 90 |
"",
|
| 91 |
type="password",
|
| 92 |
-
label="API key
|
| 93 |
)
|
| 94 |
kimi_sys = gr.Textbox(
|
| 95 |
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 96 |
-
label="System prompt
|
| 97 |
)
|
|
|
|
| 98 |
gr.ChatInterface(
|
| 99 |
kimi,
|
| 100 |
additional_inputs=[kimi_model, kimi_key, kimi_sys],
|
|
|
|
| 57 |
|
| 58 |
if __name__ == "__main__":
|
| 59 |
with gr.Blocks() as demo: # Create Gradio interface
|
| 60 |
+
gr.Markdown("# LLM API Aggregation Deployment")
|
| 61 |
with gr.Tab("DeepSeek"):
|
| 62 |
+
with gr.Accordion(label="⚙️ Settings", open=False) as ds_acc:
|
| 63 |
ds_model = gr.Dropdown(
|
| 64 |
choices=["deepseek-chat", "deepseek-reasoner"],
|
| 65 |
value="deepseek-chat",
|
| 66 |
+
label="Select a model",
|
| 67 |
)
|
| 68 |
ds_key = gr.Textbox(
|
| 69 |
"",
|
| 70 |
type="password",
|
| 71 |
+
label="API key",
|
| 72 |
)
|
| 73 |
ds_sys = gr.Textbox(
|
| 74 |
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 75 |
+
label="System prompt",
|
| 76 |
)
|
| 77 |
+
|
| 78 |
gr.ChatInterface(
|
| 79 |
deepseek,
|
| 80 |
additional_inputs=[ds_model, ds_key, ds_sys],
|
| 81 |
)
|
| 82 |
|
| 83 |
with gr.Tab("Kimi"):
|
| 84 |
+
with gr.Accordion(label="⚙️ Settings", open=False) as kimi_acc:
|
| 85 |
kimi_model = gr.Dropdown(
|
| 86 |
choices=["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"],
|
| 87 |
value="moonshot-v1-32k",
|
| 88 |
+
label="Select a model",
|
| 89 |
)
|
| 90 |
kimi_key = gr.Textbox(
|
| 91 |
"",
|
| 92 |
type="password",
|
| 93 |
+
label="API key",
|
| 94 |
)
|
| 95 |
kimi_sys = gr.Textbox(
|
| 96 |
"You are a useful assistant. first recognize user request and then reply carfuly and thinking",
|
| 97 |
+
label="System prompt",
|
| 98 |
)
|
| 99 |
+
|
| 100 |
gr.ChatInterface(
|
| 101 |
kimi,
|
| 102 |
additional_inputs=[kimi_model, kimi_key, kimi_sys],
|