victorknox commited on
Commit
f15b059
·
1 Parent(s): 85a2ca4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -10,7 +10,7 @@ import streamlit as st
10
 
11
  from transformers import pipeline
12
 
13
- model_name = "xlm-roberta-base-squad2"
14
 
15
  qa_pl = pipeline('question-answering', model=model_name, tokenizer=model_name, device=0)
16
 
@@ -28,4 +28,7 @@ if context and question:
28
 
29
  # result = qa_pl(context=ctx, question=q)
30
 
31
- # predictions.append(result["answer"])
 
 
 
 
10
 
11
  from transformers import pipeline
12
 
13
+ model_name = "deepset/xlm-roberta-large-squad2"
14
 
15
  qa_pl = pipeline('question-answering', model=model_name, tokenizer=model_name, device=0)
16
 
 
28
 
29
  # result = qa_pl(context=ctx, question=q)
30
 
31
+ # predictions.append(result["answer"])
32
+
33
+ model = AutoModelForQuestionAnswering.from_pretrained(model_name)
34
+ tokenizer = AutoTokenizer.from_pretrained(model_name)