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,
|
@@ -30,6 +30,7 @@ def respond(
|
|
30 |
|
31 |
for message in client.chat_completion(
|
32 |
messages,
|
|
|
33 |
max_tokens=max_tokens,
|
34 |
stream=True,
|
35 |
temperature=temperature,
|
@@ -69,5 +70,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( token=api_key)
|
10 |
|
11 |
def respond(
|
12 |
message,
|
|
|
30 |
|
31 |
for message in client.chat_completion(
|
32 |
messages,
|
33 |
+
model="deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
|
34 |
max_tokens=max_tokens,
|
35 |
stream=True,
|
36 |
temperature=temperature,
|
|
|
70 |
)
|
71 |
|
72 |
if __name__ == "__main__":
|
73 |
+
demo.queue(default_concurrency_limit=60)
|
74 |
+
demo.launch(max_threads=60)
|