notSoNLPnerd
commited on
Commit
•
3514dd3
1
Parent(s):
6137438
fixed bug and added placeholder.
Browse files- utils/ui.py +5 -3
utils/ui.py
CHANGED
@@ -51,13 +51,15 @@ def main_column():
|
|
51 |
|
52 |
st.markdown(f"<h5> {PLAIN_GPT_ANS} </h5>", unsafe_allow_html=True)
|
53 |
placeholder_plain_gpt = st.empty()
|
54 |
-
|
55 |
-
|
56 |
-
if st.session_state.get("query_type", BUTTON_LOCAL_RET_AUG) ==
|
57 |
st.markdown(f"<h5> {GPT_LOCAL_RET_AUG_ANS} </h5>", unsafe_allow_html=True)
|
58 |
else:
|
59 |
st.markdown(f"<h5>{GPT_WEB_RET_AUG_ANS} </h5>", unsafe_allow_html=True)
|
60 |
placeholder_retrieval_augmented = st.empty()
|
|
|
|
|
61 |
|
62 |
return run_pressed, placeholder_plain_gpt, placeholder_retrieval_augmented
|
63 |
|
|
|
51 |
|
52 |
st.markdown(f"<h5> {PLAIN_GPT_ANS} </h5>", unsafe_allow_html=True)
|
53 |
placeholder_plain_gpt = st.empty()
|
54 |
+
placeholder_plain_gpt.text_area(f" ", placeholder="The answer will appear here.",
|
55 |
+
key=PLAIN_GPT_ANS, height=1, label_visibility='collapsed')
|
56 |
+
if st.session_state.get("query_type", BUTTON_LOCAL_RET_AUG) == BUTTON_LOCAL_RET_AUG:
|
57 |
st.markdown(f"<h5> {GPT_LOCAL_RET_AUG_ANS} </h5>", unsafe_allow_html=True)
|
58 |
else:
|
59 |
st.markdown(f"<h5>{GPT_WEB_RET_AUG_ANS} </h5>", unsafe_allow_html=True)
|
60 |
placeholder_retrieval_augmented = st.empty()
|
61 |
+
placeholder_retrieval_augmented.text_area(f" ", placeholder="The answer will appear here.",
|
62 |
+
key=GPT_LOCAL_RET_AUG_ANS, height=1, label_visibility='collapsed')
|
63 |
|
64 |
return run_pressed, placeholder_plain_gpt, placeholder_retrieval_augmented
|
65 |
|