Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
st.markdown("# Auto-generating Question-Answering Datasets with Domain-Specific Knowledge for Language Models in Scientific Tasks", unsafe_allow_html=True)
|
5 |
|
6 |
# Transformation Algorithm
|
7 |
-
st.markdown('## QA Dataset Auto Generation', unsafe_allow_html=True)
|
8 |
|
9 |
# Question Answering
|
10 |
-
st.markdown('## Question Answering', unsafe_allow_html=True)
|
11 |
st.markdown('### Select a model: ', unsafe_allow_html=True)
|
12 |
|
13 |
# 定义模型配置选项
|
@@ -34,13 +34,13 @@ st.markdown(f'##### {model}', unsafe_allow_html=True)
|
|
34 |
|
35 |
# 加载问答模型
|
36 |
pipe = pipeline("question-answering", model=model)
|
37 |
-
st.markdown('###
|
38 |
|
39 |
# 使用Session State来存储默认的问题和上下文
|
40 |
if 'default_question' not in st.session_state:
|
41 |
-
st.session_state['default_question'] = ""
|
42 |
if 'default_context' not in st.session_state:
|
43 |
-
st.session_state['default_context'] = ""
|
44 |
|
45 |
col1, col2 = st.columns(2)
|
46 |
|
@@ -74,7 +74,7 @@ if st.button('Extract the answer'):
|
|
74 |
##########
|
75 |
# Property Extraction
|
76 |
##########
|
77 |
-
st.markdown('## Property Extraction', unsafe_allow_html=True)
|
78 |
|
79 |
default_property = "FF"
|
80 |
default_context = "The referential DSSC with Pt CE was also measured under the same conditions, which yields η of 6.66% (Voc= 0.78 V, Jsc= 13.0 mA cm−2, FF = 65.9%)."
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
st.markdown("# 🎓 Auto-generating Question-Answering Datasets with Domain-Specific Knowledge for Language Models in Scientific Tasks", unsafe_allow_html=True)
|
5 |
|
6 |
# Transformation Algorithm
|
7 |
+
st.markdown('## 🖥️ QA Dataset Auto Generation', unsafe_allow_html=True)
|
8 |
|
9 |
# Question Answering
|
10 |
+
st.markdown('## 📖 Question Answering', unsafe_allow_html=True)
|
11 |
st.markdown('### Select a model: ', unsafe_allow_html=True)
|
12 |
|
13 |
# 定义模型配置选项
|
|
|
34 |
|
35 |
# 加载问答模型
|
36 |
pipe = pipeline("question-answering", model=model)
|
37 |
+
st.markdown('### Answer the question: ', unsafe_allow_html=True)
|
38 |
|
39 |
# 使用Session State来存储默认的问题和上下文
|
40 |
if 'default_question' not in st.session_state:
|
41 |
+
st.session_state['default_question'] = "What is the value of FF?"
|
42 |
if 'default_context' not in st.session_state:
|
43 |
+
st.session_state['default_context'] = "The referential DSSC with Pt CE was also measured under the same conditions, which yields η of 6.66% (Voc= 0.78 V, Jsc= 13.0 mA cm−2, FF = 65.9%)."
|
44 |
|
45 |
col1, col2 = st.columns(2)
|
46 |
|
|
|
74 |
##########
|
75 |
# Property Extraction
|
76 |
##########
|
77 |
+
st.markdown('## 📤 Property Extraction', unsafe_allow_html=True)
|
78 |
|
79 |
default_property = "FF"
|
80 |
default_context = "The referential DSSC with Pt CE was also measured under the same conditions, which yields η of 6.66% (Voc= 0.78 V, Jsc= 13.0 mA cm−2, FF = 65.9%)."
|