Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,24 +6,33 @@ basemodel = pipeline("question-answering", model="/home/user/app/IndoLEM/", toke
|
|
6 |
|
7 |
st.title(':blue[MendoBERT] - Question Answering')
|
8 |
|
9 |
-
if '
|
|
|
|
|
|
|
10 |
st.session_state['options'] = ""
|
11 |
|
12 |
def button1_callback():
|
13 |
-
st.session_state['
|
|
|
|
|
14 |
def button2_callback():
|
15 |
-
st.session_state['
|
|
|
16 |
|
17 |
|
18 |
-
placeholder = st.empty()
|
19 |
|
20 |
st.caption('_Examples_')
|
21 |
st.button('Kami menyimpulkan bahwa polimorfisme \@GENE\$ dan AGT tidak berkontribusi pada kerentanan genetik terhadap \@DISEASE\$ dan retinopati pada populasi Kaukasia Mediterania.', use_container_width=True, on_click = button1_callback)
|
22 |
st.button('Genotipe bayi PON1 RR dan \@GENE\$ CC dikaitkan dengan \@DISEASE\$ dalam populasi penelitian kami, yang menunjukkan kemungkinan peran variabilitas paraoxonase manusia dalam etiologi kelahiran prematur.', use_container_width=True, on_click = button2_callback)
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
|
28 |
if text:
|
29 |
st.subheader('MendoBERT')
|
|
|
6 |
|
7 |
st.title(':blue[MendoBERT] - Question Answering')
|
8 |
|
9 |
+
if 'context' not in st.session_state:
|
10 |
+
st.session_state['options'] = ""
|
11 |
+
|
12 |
+
if 'question' not in st.session_state:
|
13 |
st.session_state['options'] = ""
|
14 |
|
15 |
def button1_callback():
|
16 |
+
st.session_state['context'] = "Konteks"
|
17 |
+
st.session_state['question'] = "Pertanyaan"
|
18 |
+
|
19 |
def button2_callback():
|
20 |
+
st.session_state['context'] = "Konteks"
|
21 |
+
st.session_state['question'] = "Pertanyaan"
|
22 |
|
23 |
|
|
|
24 |
|
25 |
st.caption('_Examples_')
|
26 |
st.button('Kami menyimpulkan bahwa polimorfisme \@GENE\$ dan AGT tidak berkontribusi pada kerentanan genetik terhadap \@DISEASE\$ dan retinopati pada populasi Kaukasia Mediterania.', use_container_width=True, on_click = button1_callback)
|
27 |
st.button('Genotipe bayi PON1 RR dan \@GENE\$ CC dikaitkan dengan \@DISEASE\$ dalam populasi penelitian kami, yang menunjukkan kemungkinan peran variabilitas paraoxonase manusia dalam etiologi kelahiran prematur.', use_container_width=True, on_click = button2_callback)
|
28 |
|
29 |
+
context_placeholder = st.empty()
|
30 |
+
with context_placeholder:
|
31 |
+
context = st.text_area('Enter context: ', key = 'context')
|
32 |
+
|
33 |
+
question_placeholder = st.empty()
|
34 |
+
with question_placeholder
|
35 |
+
question = st.text_area('Enter question: ', key = 'question')
|
36 |
|
37 |
if text:
|
38 |
st.subheader('MendoBERT')
|