KumaTea commited on
Commit
7ad409d
·
1 Parent(s): 73c9ccd

expose API

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +3 -3
app.py CHANGED
@@ -131,7 +131,7 @@ with gr.Blocks() as demo:
131
  info="输入你的内容,按[Enter]发送。也可以什么都不填写生成随机数据。对话一般不能太长,否则就复读机了,建议清除数据。")
132
  clear = gr.Button("清除聊天")
133
 
134
- msg.submit(evaluate_stream, [msg, chatbot, temp, top_p], [chatbot, msg])
135
  clear.click(lambda: None, None, chatbot, queue=False)
136
  gr.HTML(footer)
137
 
 
131
  info="输入你的内容,按[Enter]发送。也可以什么都不填写生成随机数据。对话一般不能太长,否则就复读机了,建议清除数据。")
132
  clear = gr.Button("清除聊天")
133
 
134
+ msg.submit(evaluate_stream, [msg, chatbot, temp, top_p], [chatbot, msg], api_name='chat')
135
  clear.click(lambda: None, None, chatbot, queue=False)
136
  gr.HTML(footer)
137
 
requirements.txt CHANGED
@@ -15,6 +15,6 @@ datasets>=2.10.1
15
  git+https://github.com/huggingface/peft.git # 最新版本 >=0.3.0.dev0
16
 
17
  --extra-index-url https://download.pytorch.org/whl/cpu
18
- torch==2.0.0+cpu
19
- torchvision==0.15.1+cpu
20
- torchaudio==2.0.1+cpu
 
15
  git+https://github.com/huggingface/peft.git # 最新版本 >=0.3.0.dev0
16
 
17
  --extra-index-url https://download.pytorch.org/whl/cpu
18
+ torch>=2.0.0+cpu
19
+ torchvision>=0.15.1+cpu
20
+ torchaudio>=2.0.1+cpu