IProject-10 commited on
Commit
316118c
1 Parent(s): b10dd3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -9,6 +9,23 @@ def predict(context, question):
9
  return res["answer"]
10
 
11
  md = """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  """
13
 
14
  context = "The Amazon rainforest, also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America..."
@@ -21,6 +38,6 @@ gr.Interface(
21
  gr.Textbox(lines=2, value=question, label="Question"),
22
  ],
23
  outputs=gr.Textbox(label="Answer"),
24
- title="Question Answering System",
25
  description=md,
26
  ).launch()
 
9
  return res["answer"]
10
 
11
  md = """
12
+ ### Description
13
+
14
+ In this project work we build a **Text Extraction Question-Answering system** using **BERT** model. QA system is a important NLP task in which the user asks a question in natural language to the model as input and the model provides the answer in natural language as output.
15
+ The language representation model BERT stands for **Bidirectional Encoder Representations from Transformers**. The model is based on the Devlin et al. paper: [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805).
16
+ Dataset used is **SQuAD 2.0** [Stanford Question Answering Dataset 2.0](https://rajpurkar.github.io/SQuAD-explorer/). It is a reading comprehension dataset which consists of question-answer pairs derived from wikipedia articles written by crowdworkers.
17
+ The answer to all the questions is in the form of a span of text.
18
+
19
+
20
+ ### Design of the system:
21
+ <br>
22
+ <div style="text-align: center;">
23
+ <img src="https://i.imgur.com/G4qgMhE.jpeg" alt="Description Image" style="border: 2px solid #000; border-radius: 5px; width: 600px; height: auto; display: block; margin: 0 auto;">
24
+ </div>
25
+
26
+ ### QA Application:
27
+ Add a context paragraphs upto 512 tokens and ask a question based on the context. The model acccurately fetches the answer from the context in the form of a text span and display it.
28
+
29
  """
30
 
31
  context = "The Amazon rainforest, also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America..."
 
38
  gr.Textbox(lines=2, value=question, label="Question"),
39
  ],
40
  outputs=gr.Textbox(label="Answer"),
41
+ title="Question & Answering with BERT using the SQuAD 2 dataset",
42
  description=md,
43
  ).launch()