wangzhang commited on
Commit
1a93d4e
·
1 Parent(s): 0e82057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,8 +5,8 @@ client = InferenceClient(model="https://9bsneexhe83nu6-80.proxy.runpod.net")
5
 
6
  def inference(message, history):
7
  partial_message = ""
8
- for token in client.text_generation(prompt=message, max_new_tokens=1024, stream=True, best_of=1, temperature=0.1, watermark=True,
9
- top_p=0.95, do_sample=True, repetition_penalty=2.1):
10
  if token.startswith("<s>"):
11
  return partial_message
12
  partial_message += token
@@ -15,10 +15,10 @@ def inference(message, history):
15
  gr.ChatInterface(
16
  inference,
17
  chatbot=gr.Chatbot(height=300, scale=7),
18
- textbox=gr.Textbox(placeholder="你可以问我任何关于SequoiaDB的问题!", container=False, scale=7),
19
- description="<h3>ChatSDB是SequoiaDB旗下的AI智能大语言模型,训练超过上万条真实数据和7亿参数</h3><strong>模型🔗: <a>https://huggingface.co/wangzhang/ChatSDB </a></strong><br><strong>Dataset🔗: <a>https://huggingface.co/datasets/wangzhang/sdb </a></strong><br><strong> API Doc🔗: <a>https://zgg3nzdpswxy4a-80.proxy.runpod.net/docs/ <a> </strong>",
20
  title="ChatSDB",
21
- examples=["SequoiaDB巨杉数据库是什么?", "SequoiaDB巨杉数据库支持哪些类型的数据库实例?", "SequoiaDB巨杉数据库的优势有哪些?"],
22
  retry_btn="重试",
23
  undo_btn="撤销",
24
  clear_btn="清除",
 
5
 
6
  def inference(message, history):
7
  partial_message = ""
8
+ for token in client.text_generation(prompt=message, max_new_tokens=512, stream=True, best_of=1, temperature=0.3,
9
+ top_p=0.99, do_sample=True, repetition_penalty=1.0):
10
  if token.startswith("<s>"):
11
  return partial_message
12
  partial_message += token
 
15
  gr.ChatInterface(
16
  inference,
17
  chatbot=gr.Chatbot(height=300, scale=7),
18
+ textbox=gr.Textbox(placeholder="你可以问我任何关于SequioaDB的问题!", container=False, scale=7),
19
+ description="这是SequioaDB旗下的AI智能大语言模型,训练超过上万条真实数据和7亿参数。",
20
  title="ChatSDB",
21
+ examples=["SequoiaDB巨杉数据库是什么?", "SequoiaDB巨杉数据库支持哪些类型的数据库实例?"],
22
  retry_btn="重试",
23
  undo_btn="撤销",
24
  clear_btn="清除",