Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ api_key = os.environ.get('qwen_API_KEY')
|
|
| 6 |
"""
|
| 7 |
For more information on huggingface_hub Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 8 |
"""
|
| 9 |
-
client = InferenceClient("
|
| 10 |
|
| 11 |
def respond(
|
| 12 |
message,
|
|
@@ -57,10 +57,10 @@ demo = gr.ChatInterface(
|
|
| 57 |
fn=respond,
|
| 58 |
examples=example_prompts,
|
| 59 |
cache_examples=False,
|
| 60 |
-
title="
|
| 61 |
description="千问2.5-72B聊天机器人",
|
| 62 |
additional_inputs=[
|
| 63 |
-
gr.Textbox(value="You are
|
| 64 |
gr.Slider(minimum=1, maximum=8888, value=2048, step=1, label="Max new tokens"),
|
| 65 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 66 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
|
@@ -69,5 +69,5 @@ demo = gr.ChatInterface(
|
|
| 69 |
)
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|
| 72 |
-
demo.queue(default_concurrency_limit=
|
| 73 |
-
demo.launch(max_threads=
|
|
|
|
| 6 |
"""
|
| 7 |
For more information on huggingface_hub Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 8 |
"""
|
| 9 |
+
client = InferenceClient("deepseek-ai/DeepSeek-V3", token=api_key,provider="together")
|
| 10 |
|
| 11 |
def respond(
|
| 12 |
message,
|
|
|
|
| 57 |
fn=respond,
|
| 58 |
examples=example_prompts,
|
| 59 |
cache_examples=False,
|
| 60 |
+
title="DeepSeek-V3",
|
| 61 |
description="千问2.5-72B聊天机器人",
|
| 62 |
additional_inputs=[
|
| 63 |
+
gr.Textbox(value="You are a helpful assistant.", label="System message"),
|
| 64 |
gr.Slider(minimum=1, maximum=8888, value=2048, step=1, label="Max new tokens"),
|
| 65 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
| 66 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
|
|
|
| 69 |
)
|
| 70 |
|
| 71 |
if __name__ == "__main__":
|
| 72 |
+
demo.queue(default_concurrency_limit=80)
|
| 73 |
+
demo.launch(max_threads=80)
|