wwpop commited on
Commit
b3a9230
1 Parent(s): ccf21d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  import os
 
 
4
  api_key=os.environ.get('qwen_API_KEY')
5
  """
6
  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
@@ -49,7 +51,6 @@ example_prompts = [
49
  demo = gr.ChatInterface(
50
  respond,
51
  examples=example_prompts,
52
- cache_examples=False,
53
  title="千问2.5-72B",
54
  description="千问2.5-72B聊天机器人",
55
  additional_inputs=[
@@ -58,7 +59,7 @@ demo = gr.ChatInterface(
58
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
59
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
60
  ],
61
- chatbot=gr.Chatbot(show_label=True, show_share_button=False, show_copy_button=True)
62
 
63
  )
64
 
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  import os
4
+ import json
5
+
6
  api_key=os.environ.get('qwen_API_KEY')
7
  """
8
  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
 
51
  demo = gr.ChatInterface(
52
  respond,
53
  examples=example_prompts,
 
54
  title="千问2.5-72B",
55
  description="千问2.5-72B聊天机器人",
56
  additional_inputs=[
 
59
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
60
  gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
61
  ],
62
+ chatbot=gr.Chatbot(show_label=True, show_copy_button=True)
63
 
64
  )
65