Skip to content

Commit 1fb34ee

Browse files
committed
changed to bert model
1 parent 845bbac commit 1fb34ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from transformers import pipeline
66
import streamlit as st
77
from fuzzywuzzy import process
8+
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
9+
810

911
def read_dataset(file_path):
1012
return pd.read_csv(file_path)
@@ -37,7 +39,8 @@ def plot_scatter(data, col1, col2):
3739
ax.set_title(f'Scatter plot of {col1} vs {col2}')
3840
return fig
3941

40-
nlp_model = pipeline("question-answering", model="distilbert-base-uncased", tokenizer="distilbert-base-uncased")
42+
model_name = "bert-large-uncased-whole-word-masking-finetuned-squad"
43+
nlp_model = pipeline("question-answering", model=model_name, tokenizer=model_name)
4144

4245
def extract_columns(query, data):
4346
words = query.lower().split()

0 commit comments

Comments
 (0)