Spaces:
Paused
Paused
CountingMstar
commited on
Commit
•
993e75e
1
Parent(s):
453e156
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import BertForQuestionAnswering
|
|
|
3 |
|
|
|
4 |
model = BertForQuestionAnswering.from_pretrained("bert-base-uncased")
|
5 |
|
6 |
def get_prediction(context, question):
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import BertForQuestionAnswering
|
3 |
+
from transformers import BertTokenizerFast
|
4 |
|
5 |
+
tokenizer = BertTokenizerFast.from_pretrained('bert-base-uncased')
|
6 |
model = BertForQuestionAnswering.from_pretrained("bert-base-uncased")
|
7 |
|
8 |
def get_prediction(context, question):
|