Browse Source

Merge pull request #223 from mojianhao/patch-1

Update api.py
pull/235/head
Zhengxiao Du 2 years ago committed by GitHub
parent
commit
697ee00263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      api.py

4
api.py

@ -28,8 +28,8 @@ async def create_item(request: Request):
if __name__ == '__main__':
uvicorn.run('API:app', host='0.0.0.0', port=8000, workers=1)
uvicorn.run('api:app', host='0.0.0.0', port=8000, workers=1)
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm_6b", trust_remote_code=True).half().cuda()
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
model.eval()

Loading…
Cancel
Save