Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,11 +13,10 @@ st.sidebar.header('What will you like to do?')
|
|
13 |
option = st.sidebar.radio('', ['Extractive question answering', 'Text summarization', 'Text generation', 'Sentiment analysis'])
|
14 |
|
15 |
@st.cache(show_spinner=False, allow_output_mutation=True)
|
16 |
-
def question_answerer(
|
17 |
model_name = "deepset/roberta-base-squad2"
|
18 |
-
pipeline(model=model_name, tokenizer=model_name, revision="v1.0", task="question-answering")
|
19 |
-
|
20 |
-
return result['answer']
|
21 |
|
22 |
@st.cache(show_spinner=False, allow_output_mutation=True)
|
23 |
def summarization_model():
|
|
|
13 |
option = st.sidebar.radio('', ['Extractive question answering', 'Text summarization', 'Text generation', 'Sentiment analysis'])
|
14 |
|
15 |
@st.cache(show_spinner=False, allow_output_mutation=True)
|
16 |
+
def question_answerer():
|
17 |
model_name = "deepset/roberta-base-squad2"
|
18 |
+
question_answerer = pipeline(model=model_name, tokenizer=model_name, revision="v1.0", task="question-answering")
|
19 |
+
return question_answerer
|
|
|
20 |
|
21 |
@st.cache(show_spinner=False, allow_output_mutation=True)
|
22 |
def summarization_model():
|