update web demo

Former-commit-id: 5b6ad9adb665096bfb36dc90789a1d4a16345122
This commit is contained in:
hiyouga
2023-08-03 13:28:28 +08:00
parent 9c96b97dc7
commit da08fa7c63
8 changed files with 31 additions and 48 deletions

View File

@@ -1,8 +1,3 @@
# coding=utf-8
# Implements API for fine-tuned models in OpenAI's format. (https://platform.openai.com/docs/api-reference/chat)
# Usage: python api_demo.py --model_name_or_path path_to_model --checkpoint_dir path_to_checkpoint
# Visit http://localhost:8000/docs for document.
import uvicorn
from llmtuner import ChatModel, create_app
@@ -12,6 +7,7 @@ def main():
chat_model = ChatModel()
app = create_app(chat_model)
uvicorn.run(app, host="0.0.0.0", port=8000, workers=1)
# Visit http://localhost:8000/docs for document.
if __name__ == "__main__":