mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-23 06:12:50 +08:00
15 lines
437 B
Python
15 lines
437 B
Python
# 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 create_app
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = create_app()
|
|
uvicorn.run(app, host="0.0.0.0", port=8000, workers=1)
|