File size: 1,590 Bytes
e5e4dfd dba62ca e5e4dfd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
---
title: Bert Based Question Answering App
emoji: π
colorFrom: purple
colorTo: green
sdk: gradio
sdk_version: 4.22.0
app_file: app.py
pinned: false
---
# Bert Based Question Answering
This is a question answering application based on the BERT model. Users can input a context and a question, and the model will generate an answer based on the context.
## Usage
1. Install dependencies:
```bash
pip install torch transformers gradio
```
2. Run the application:
```bash
python app.py
```
3. Once the application is running, open the provided URL in your web browser. You can then enter the context and question to get the model's response.
## Example Interactions
The application comes preloaded with some example interactions. Here are a few examples:
- **Context**: "The capital of France is Paris."
- **Question**: "What is the capital of France?"
- **Expected Response**: "Paris"
- **Context**: "Water boils at 100 degrees Celsius or 212 degrees Fahrenheit."
- **Question**: "At what temperature does water boil?"
- **Expected Response**: "100 degrees Celsius"
- **Context**: "The Mona Lisa was painted by Leonardo da Vinci."
- **Question**: "Who painted the Mona Lisa?"
- **Expected Response**: "Leonardo da Vinci"
## Interface Customization
The interface is customizable and includes styling for a better user experience. You can further customize it by modifying the code in `app.py`.
## Author
Developed by [Ajeetkumar Ukande].
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|