wangzhang commited on
Commit
d1b608d
·
1 Parent(s): 6084c6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,17 +5,17 @@ client = InferenceClient(model="https://zgg3nzdpswxy4a-80.proxy.runpod.net/")
5
 
6
  def inference(message, history):
7
  partial_message = ""
8
- for token in client.text_generation(message, max_new_tokens=1024, stream=True):
9
  partial_message += token
10
  yield partial_message
11
 
12
  gr.ChatInterface(
13
  inference,
14
  chatbot=gr.Chatbot(height=300),
15
- textbox=gr.Textbox(placeholder="你可以问我任何关于巨杉数据库的问题!", container=False, scale=7),
16
- description="这是巨杉数据库旗下的AI智能助手由Llama2-13b为原型打造.",
17
- title="巨杉数据库AI智能助手",
18
- examples=["巨杉数据库有哪些优势?", "巨杉数据库有哪些功能"],
19
  retry_btn="重试",
20
  undo_btn="撤销",
21
  clear_btn="清除",
 
5
 
6
  def inference(message, history):
7
  partial_message = ""
8
+ for token in client.text_generation(message, max_new_tokens=512, stream=True, do_sample=True):
9
  partial_message += token
10
  yield partial_message
11
 
12
  gr.ChatInterface(
13
  inference,
14
  chatbot=gr.Chatbot(height=300),
15
+ textbox=gr.Textbox(placeholder="你可以问我任何关于SequioaDB的问题!", container=False, scale=7),
16
+ description="这是SequioaDB旗下的AI智能助手由Llama2-7b为原型打造.",
17
+ title="SequioaDBAI智能助手",
18
+ examples=["SequioaDB是什么?", "SequioaDB有哪些功能?"],
19
  retry_btn="重试",
20
  undo_btn="撤销",
21
  clear_btn="清除",