UP
This commit is contained in:
		
							parent
							
								
									0666fec86e
								
							
						
					
					
						commit
						1f6defedfc
					
				
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.py
									
									
									
									
									
								
							@ -126,8 +126,8 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=
 | 
				
			|||||||
    cancel_handles.append(txt2.submit(**predict_args))
 | 
					    cancel_handles.append(txt2.submit(**predict_args))
 | 
				
			||||||
    cancel_handles.append(submitBtn.click(**predict_args))
 | 
					    cancel_handles.append(submitBtn.click(**predict_args))
 | 
				
			||||||
    cancel_handles.append(submitBtn2.click(**predict_args))
 | 
					    cancel_handles.append(submitBtn2.click(**predict_args))
 | 
				
			||||||
    resetBtn.click(lambda: ([], [], "已重置"), None, output_combo)
 | 
					    resetBtn.click(lambda: ([], [], "已重置"), None, [chatbot, history, status])
 | 
				
			||||||
    resetBtn2.click(lambda: ([], [], "已重置"), None, output_combo)
 | 
					    resetBtn2.click(lambda: ([], [], "已重置"), None, [chatbot, history, status])
 | 
				
			||||||
    # 基础功能区的回调函数注册
 | 
					    # 基础功能区的回调函数注册
 | 
				
			||||||
    for k in functional:
 | 
					    for k in functional:
 | 
				
			||||||
        click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
 | 
					        click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
 | 
				
			||||||
 | 
				
			|||||||
@ -43,7 +43,7 @@ def ArgsGeneralWrapper(f):
 | 
				
			|||||||
        plugin_kwargs = {
 | 
					        plugin_kwargs = {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        chatbot_with_cookie = ChatBotWithCookies(cookies)
 | 
					        chatbot_with_cookie = ChatBotWithCookies(cookies)
 | 
				
			||||||
        chatbot_with_cookie.write_list(txt_passon)
 | 
					        chatbot_with_cookie.write_list(chatbot)
 | 
				
			||||||
        yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
 | 
					        yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
 | 
				
			||||||
    return decorated
 | 
					    return decorated
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user