MVPilgrim commited on
Commit
2c4c0b3
·
1 Parent(s): 32118b6

8vcpu invalid instruction

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -529,6 +529,19 @@ try:
529
  ##########################
530
  col1, col2 = st.columns(2)
531
  with col1:
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  if "sysTA" not in st.session_state:
533
  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.")
534
  elif "sysTAtext" in st.session_state:
@@ -547,19 +560,6 @@ try:
547
  help="Enter a prompt for the LLM. No special characters needed.")
548
 
549
  with col2:
550
- if not st.session_state.spinGenMsg or st.session_state.spinGenMsg == False:
551
- pass
552
- else:
553
- st.session_state.spinGenMsg = False;
554
- with st.spinner('Generating Completion (but slowly. 40+ seconds.)...'):
555
- st.session_state.sysTAtext = st.session_state.sysTA
556
- logger.debug(f"sysTAtext: {st.session_state.sysTAtext}")
557
- wrklist = setPrompt(st.session_state.userpTA,st.selectRag)
558
- st.session_state.userpTA = wrklist[1]["content"]
559
- logger.debug(f"userpTAtext: {st.session_state.userpTA}")
560
- rsp = runLLM(wrklist)
561
- st.session_state.rspTA = rsp
562
- logger.debug(f"rspTAtext: {st.session_state.rspTA}")
563
  if "ragpTA" not in st.session_state:
564
  st.session_state.ragpTA = st.text_area(label="RAG Response",placeholder="Output if RAG selected.",help="RAG output if enabled.")
565
  elif "ragpTAtext" in st.session_state:
 
529
  ##########################
530
  col1, col2 = st.columns(2)
531
  with col1:
532
+ if 'spinGenMsg' not in st.session_state or st.session_state.spinGenMsg == False:
533
+ pass
534
+ else:
535
+ st.session_state.spinGenMsg = False;
536
+ with st.spinner('Generating Completion (but slowly. 40+ seconds.)...'):
537
+ st.session_state.sysTAtext = st.session_state.sysTA
538
+ logger.debug(f"sysTAtext: {st.session_state.sysTAtext}")
539
+ wrklist = setPrompt(st.session_state.userpTA,st.selectRag)
540
+ st.session_state.userpTA = wrklist[1]["content"]
541
+ logger.debug(f"userpTAtext: {st.session_state.userpTA}")
542
+ rsp = runLLM(wrklist)
543
+ st.session_state.rspTA = rsp
544
+ logger.debug(f"rspTAtext: {st.session_state.rspTA}")
545
  if "sysTA" not in st.session_state:
546
  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.")
547
  elif "sysTAtext" in st.session_state:
 
560
  help="Enter a prompt for the LLM. No special characters needed.")
561
 
562
  with col2:
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  if "ragpTA" not in st.session_state:
564
  st.session_state.ragpTA = st.text_area(label="RAG Response",placeholder="Output if RAG selected.",help="RAG output if enabled.")
565
  elif "ragpTAtext" in st.session_state: