Saurabhz commited on
Commit
5946045
·
1 Parent(s): d755c3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,12 +1,13 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- # Replace this with your own checkpoint
5
- model_checkpoint = "huggingface-course/bert-finetuned-squad"
6
- model = pipeline("question-answering", model=model_checkpoint)
7
 
8
- def question_answer(context, question,model):
9
- to_predict = [
 
 
 
 
10
  {
11
  "context": context,
12
  "qas": [
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
 
 
 
4
 
5
+
6
+ def question_answer(context, question):
7
+ # Replace this with your own checkpoint
8
+ model_checkpoint = "huggingface-course/bert-finetuned-squad"
9
+ model = pipeline("question-answering", model=model_checkpoint)
10
+ to_predict = [
11
  {
12
  "context": context,
13
  "qas": [