hjxdl 0.2.31__py3-none-any.whl → 0.2.32__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hdl/_version.py +2 -2
- hdl/utils/llm/chatgr.py +14 -1
- {hjxdl-0.2.31.dist-info → hjxdl-0.2.32.dist-info}/METADATA +1 -1
- {hjxdl-0.2.31.dist-info → hjxdl-0.2.32.dist-info}/RECORD +6 -6
- {hjxdl-0.2.31.dist-info → hjxdl-0.2.32.dist-info}/WHEEL +0 -0
- {hjxdl-0.2.31.dist-info → hjxdl-0.2.32.dist-info}/top_level.txt +0 -0
hdl/_version.py
CHANGED
hdl/utils/llm/chatgr.py
CHANGED
@@ -34,6 +34,17 @@ def chat_with_llm(user_input, chat_history=[]):
|
|
34
34
|
|
35
35
|
# 构建 Gradio 界面
|
36
36
|
def create_demo():
|
37
|
+
"""
|
38
|
+
Creates a Gradio demo interface for a chatbot application.
|
39
|
+
The interface consists of:
|
40
|
+
- A chat history display at the top of the page.
|
41
|
+
- A user input textbox and a send button at the bottom of the page.
|
42
|
+
The send button and the enter key are both bound to the `chat_with_llm` function,
|
43
|
+
which handles sending the user's message and updating the chat history.
|
44
|
+
Returns:
|
45
|
+
gr.Blocks: The Gradio Blocks object representing the demo interface.
|
46
|
+
"""
|
47
|
+
|
37
48
|
with gr.Blocks() as demo:
|
38
49
|
chat_history = gr.State([]) # 存储聊天历史
|
39
50
|
output = gr.Chatbot(label="Chat History") # 聊天记录在页面顶端
|
@@ -72,4 +83,6 @@ if __name__ == "__main__":
|
|
72
83
|
|
73
84
|
# 启动 Gradio 应用
|
74
85
|
demo = create_demo()
|
75
|
-
demo.launch(server_name=args.host, server_port=args.port)
|
86
|
+
demo.launch(server_name=args.host, server_port=args.port)
|
87
|
+
|
88
|
+
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hdl/__init__.py,sha256=GffnD0jLJdhkd-vo989v40N90sQbofkayRBwxc6TVhQ,72
|
2
|
-
hdl/_version.py,sha256=
|
2
|
+
hdl/_version.py,sha256=jSnpQjxfX4ZsfrMFFxLeBiF7_cxq8o44X1E_cpi4UPE,413
|
3
3
|
hdl/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
hdl/args/loss_args.py,sha256=s7YzSdd7IjD24rZvvOrxLLFqMZQb9YylxKeyelSdrTk,70
|
5
5
|
hdl/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -128,7 +128,7 @@ hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
128
128
|
hdl/utils/general/glob.py,sha256=8-RCnt6L297wMIfn34ZAMCsGCZUjHG3MGglGZI1cX0g,491
|
129
129
|
hdl/utils/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
130
130
|
hdl/utils/llm/chat.py,sha256=OzyY9xACOOocx9zZigtq9YAPvHtDUo8v2fvf1Tyjg_U,14891
|
131
|
-
hdl/utils/llm/chatgr.py,sha256=
|
131
|
+
hdl/utils/llm/chatgr.py,sha256=lKaDeimYz-Bw32QXYtde51xjf7gbfS2CEYt5R0ODunM,4075
|
132
132
|
hdl/utils/llm/embs.py,sha256=Tf0FOYrOFZp7qQpEPiSCXzlgyHH0X9HVTUtsup74a9E,7174
|
133
133
|
hdl/utils/llm/extract.py,sha256=2sK_WJzmYIc8iuWaM9DA6Nw3_6q1O4lJ5pKpcZo-bBA,6512
|
134
134
|
hdl/utils/llm/llama_chat.py,sha256=watcHGOaz-bv3x-yDucYlGk5f8FiqfFhwWogrl334fk,4387
|
@@ -138,7 +138,7 @@ hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
138
138
|
hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
|
139
139
|
hdl/utils/weather/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
140
140
|
hdl/utils/weather/weather.py,sha256=k11o6wM15kF8b9NMlEfrg68ak-SfSYLN3nOOflFUv-I,4381
|
141
|
-
hjxdl-0.2.
|
142
|
-
hjxdl-0.2.
|
143
|
-
hjxdl-0.2.
|
144
|
-
hjxdl-0.2.
|
141
|
+
hjxdl-0.2.32.dist-info/METADATA,sha256=DLlf5Bv3kIdC3Zs-a9iKvjQsCzN5e7QL_BXvVa9IywA,836
|
142
|
+
hjxdl-0.2.32.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
143
|
+
hjxdl-0.2.32.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
|
144
|
+
hjxdl-0.2.32.dist-info/RECORD,,
|
File without changes
|
File without changes
|