Spaces:
Running
Running
MVPilgrim
commited on
Commit
·
01e614b
1
Parent(s):
751e263
debug
Browse files
app.py
CHANGED
@@ -431,32 +431,34 @@ try:
|
|
431 |
if "sysTA" not in st.session_state:
|
432 |
st.session_state.sysTA = st.text_area(label="System Prompt",placeholder="You are a helpful AI assistant", help="Instruct the LLM about how to handle the user prompt.")
|
433 |
elif "sysTAtext" in st.session_state:
|
434 |
-
st.session_state.sysTA = st.text_area(label="
|
435 |
else:
|
436 |
-
st.session_state.sysTA = st.text_area(label="
|
437 |
|
438 |
if "userpTA" not in st.session_state:
|
439 |
st.session_state.userpTA = st.text_area(label="UserPrompt",placeholder="Prompt the LLM with a question or instruction.", \
|
440 |
help="Enter a prompt for the LLM. No special characters needed.")
|
441 |
elif "userpTAtext" in st.session_state:
|
442 |
-
st.session_state.userpTA = st.text_area (label="
|
|
|
443 |
else:
|
444 |
-
st.session_state.userpTA = st.text_area(label="
|
|
|
445 |
|
446 |
with col2:
|
447 |
if "ragpTA" not in st.session_state:
|
448 |
-
st.session_state.ragpTA = st.text_area(label="RAG Response",placeholder="
|
449 |
elif "ragpTAtext" in st.session_state:
|
450 |
-
st.session_state.ragpTA = st.text_area(label="
|
451 |
else:
|
452 |
-
st.session_state.ragpTA = st.text_area(label="
|
453 |
|
454 |
if "rspTA" not in st.session_state:
|
455 |
st.session_state.rspTA = st.text_area(label="LLM Completion",placeholder="LLM completion.",help="Output area for LLM completion (response).")
|
456 |
elif "rspTAtext" in st.session_state:
|
457 |
-
st.session_state.rspTA = st.text_area(label="
|
458 |
else:
|
459 |
-
st.session_state.rspTA = st.text_area(label="
|
460 |
|
461 |
def runLLM(prompt):
|
462 |
logger = st.session_state.logger
|
@@ -540,8 +542,8 @@ try:
|
|
540 |
logger.info("### on_getAllRagButton_Clicked exited.")
|
541 |
|
542 |
with st.sidebar:
|
543 |
-
st.selectRag = st.checkbox("Enable
|
544 |
-
st.runLLMButton = st.button("Run LLM
|
545 |
st.getAllRagDataButton = st.button("Get All Rag Data",key=None,help=None,on_click=on_getAllRagDataButton_Clicked,args=None,kwargs=None,type="secondary",disabled=False,use_container_width=False)
|
546 |
|
547 |
logger.info("#### semsearch.py end of code.")
|
|
|
431 |
if "sysTA" not in st.session_state:
|
432 |
st.session_state.sysTA = st.text_area(label="System Prompt",placeholder="You are a helpful AI assistant", help="Instruct the LLM about how to handle the user prompt.")
|
433 |
elif "sysTAtext" in st.session_state:
|
434 |
+
st.session_state.sysTA = st.text_area(label="System Prompt",value=st.session_state.sysTAtext,placeholder="You are a helpful AI assistant", help="Instruct the LLM about how to handle the user prompt.")
|
435 |
else:
|
436 |
+
st.session_state.sysTA = st.text_area(label="System Prompt",value=st.session_state.sysTA,placeholder="You are a helpful AI assistant", help="Instruct the LLM about how to handle the user prompt.")
|
437 |
|
438 |
if "userpTA" not in st.session_state:
|
439 |
st.session_state.userpTA = st.text_area(label="UserPrompt",placeholder="Prompt the LLM with a question or instruction.", \
|
440 |
help="Enter a prompt for the LLM. No special characters needed.")
|
441 |
elif "userpTAtext" in st.session_state:
|
442 |
+
st.session_state.userpTA = st.text_area (label="UserPrompt",value=st.session_state.userpTAtext,placeholder="Prompt the LLM with a question or instruction.", \
|
443 |
+
help="Enter a prompt for the LLM. No special characters needed.")
|
444 |
else:
|
445 |
+
st.session_state.userpTA = st.text_area(label="UserPrompt",value=st.session_state.userpTA,placeholder="Prompt the LLM with a question or instruction.", \
|
446 |
+
help="Enter a prompt for the LLM. No special characters needed.")
|
447 |
|
448 |
with col2:
|
449 |
if "ragpTA" not in st.session_state:
|
450 |
+
st.session_state.ragpTA = st.text_area(label="RAG Response",placeholder="Output if RAG selected.",help="RAG output if enabled.")
|
451 |
elif "ragpTAtext" in st.session_state:
|
452 |
+
st.session_state.ragpTA = st.text_area(label="RAG Response",value=st.session_state.ragpTAtext,placeholder="Output if RAG selected.",help="RAG output if enabled.")
|
453 |
else:
|
454 |
+
st.session_state.ragpTA = st.text_area(label="RAG Response",value=st.session_state.ragpTA,placeholder="Output if RAG selected.",help="RAG output if enabled.")
|
455 |
|
456 |
if "rspTA" not in st.session_state:
|
457 |
st.session_state.rspTA = st.text_area(label="LLM Completion",placeholder="LLM completion.",help="Output area for LLM completion (response).")
|
458 |
elif "rspTAtext" in st.session_state:
|
459 |
+
st.session_state.rspTA = st.text_area(label="LLM Completion",value=st.session_state.rspTAtext,placeholder="LLM completion.",help="Output area for LLM completion (response).")
|
460 |
else:
|
461 |
+
st.session_state.rspTA = st.text_area(label="LLM Completion",value=st.session_state.rspTA,placeholder="LLM completion.",help="Output area for LLM completion (response).")
|
462 |
|
463 |
def runLLM(prompt):
|
464 |
logger = st.session_state.logger
|
|
|
542 |
logger.info("### on_getAllRagButton_Clicked exited.")
|
543 |
|
544 |
with st.sidebar:
|
545 |
+
st.selectRag = st.checkbox("Enable RAG",value=False,key="selectRag",help=None,on_change=None,args=None,kwargs=None,disabled=False,label_visibility="visible")
|
546 |
+
st.runLLMButton = st.button("Run LLM Prompt",key=None,help=None,on_click=on_runLLMButton_Clicked,args=None,kwargs=None,type="secondary",disabled=False,use_container_width=False)
|
547 |
st.getAllRagDataButton = st.button("Get All Rag Data",key=None,help=None,on_click=on_getAllRagDataButton_Clicked,args=None,kwargs=None,type="secondary",disabled=False,use_container_width=False)
|
548 |
|
549 |
logger.info("#### semsearch.py end of code.")
|