Bert qa app
1.0.0
This project is a simple FastAPI application that uses a Hugging Face BERT model for question-answering.
Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
Build the Docker image:
docker build -t fastapi-bert .
Run the Docker container:
docker run -p 7860:7860 fastapi-bert
After running the Docker container, the application will be available at http://localhost:7860
.
GET /: Returns a "Hello World" message.
GET /answer: Accepts a question and a context as query parameters and returns an answer.
Example:
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'