Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
# 初始化管道
|
5 |
pipe = pipeline("question-answering", model="ZongqianLi/bert-base-cased-scqa2")
|
6 |
|
7 |
-
|
8 |
-
|
|
|
9 |
question = st.text_input("Enter your question here")
|
10 |
|
11 |
-
# 当获取到问题和上下文后,执行问题回答
|
12 |
if context and question:
|
13 |
out = pipe({
|
14 |
'question': question,
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
|
|
4 |
pipe = pipeline("question-answering", model="ZongqianLi/bert-base-cased-scqa2")
|
5 |
|
6 |
+
st.write("Here's our first attempt at using data to create a table:")
|
7 |
+
|
8 |
+
context = st.text_input("Enter the context here")
|
9 |
question = st.text_input("Enter your question here")
|
10 |
|
|
|
11 |
if context and question:
|
12 |
out = pipe({
|
13 |
'question': question,
|