Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
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="
|
16 |
-
description="
|
17 |
-
title="
|
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="清除",
|