Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -572,10 +572,7 @@ try: | |
| 572 | 
             
                    if 'spinGenMsg' not in st.session_state or st.session_state.spinGenMsg == False:
         | 
| 573 | 
             
                        placeHolder = st.empty()
         | 
| 574 | 
             
                    else:
         | 
| 575 | 
            -
                        elapsedTime = 0.00
         | 
| 576 | 
             
                        startTime = datetime.now()
         | 
| 577 | 
            -
                        thread = threading.Thread(target=calcElapsedTime(startTime))
         | 
| 578 | 
            -
                        thread.start()
         | 
| 579 | 
             
                        st.session_state.spinGenMsg = False;
         | 
| 580 | 
             
                        with st.spinner(f"Generating Completion...Elapsed Time: {elapsedTime}"): 
         | 
| 581 | 
             
                            st.session_state.sysTAtext = st.session_state.sysTA
         | 
| @@ -595,8 +592,9 @@ try: | |
| 595 | 
             
                            #    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.")
         | 
| 596 | 
             
                            #else:
         | 
| 597 | 
             
                            #    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.")
         | 
| 598 | 
            -
                             | 
| 599 | 
            -
             | 
|  | |
| 600 | 
             
                    if "sysTA" not in st.session_state:
         | 
| 601 | 
             
                        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.")
         | 
| 602 | 
             
                    elif "sysTAtext" in st.session_state:
         | 
|  | |
| 572 | 
             
                    if 'spinGenMsg' not in st.session_state or st.session_state.spinGenMsg == False:
         | 
| 573 | 
             
                        placeHolder = st.empty()
         | 
| 574 | 
             
                    else:
         | 
|  | |
| 575 | 
             
                        startTime = datetime.now()
         | 
|  | |
|  | |
| 576 | 
             
                        st.session_state.spinGenMsg = False;
         | 
| 577 | 
             
                        with st.spinner(f"Generating Completion...Elapsed Time: {elapsedTime}"): 
         | 
| 578 | 
             
                            st.session_state.sysTAtext = st.session_state.sysTA
         | 
|  | |
| 592 | 
             
                            #    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.")
         | 
| 593 | 
             
                            #else:
         | 
| 594 | 
             
                            #    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.")
         | 
| 595 | 
            +
                            elapsedTime = datetime.now() - startTime
         | 
| 596 | 
            +
                            logger.info(f"#### elapsedTime: {elapsedTime}")
         | 
| 597 | 
            +
                    
         | 
| 598 | 
             
                    if "sysTA" not in st.session_state:
         | 
| 599 | 
             
                        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.")
         | 
| 600 | 
             
                    elif "sysTAtext" in st.session_state:
         |