Bert qa app
1.0.0
이 프로젝트는 질문 답변을 위해 Hugging Face BERT 모델을 사용하는 간단한 FastAPI 애플리케이션입니다.
저장소를 복제합니다.
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
Docker 이미지를 빌드합니다.
docker build -t fastapi-bert .
Docker 컨테이너를 실행합니다.
docker run -p 7860:7860 fastapi-bert
Docker 컨테이너를 실행한 후 http://localhost:7860
에서 애플리케이션을 사용할 수 있습니다.
GET / : "Hello World" 메시지를 반환합니다.
GET /answer : 질문과 컨텍스트를 쿼리 매개변수로 받아들이고 답변을 반환합니다.
예:
curl -X ' GET '
' http://localhost:7860/answer?question=What%20is%20the%20capital%20of%20France?&context=Paris%20is%20the%20capital%20of%20France. '
-H ' accept: application/json '