Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	修正prompt
Browse files
    	
        crazy_functions/Latex全文润色.py
    CHANGED
    
    | @@ -72,11 +72,10 @@ def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch | |
| 72 | 
             
                #     sys_prompt="Your job is to collect information from materials。",
         | 
| 73 | 
             
                # )
         | 
| 74 |  | 
| 75 | 
            -
                #  <--------  | 
| 76 | 
             
                if language == 'en':
         | 
| 77 | 
            -
                    inputs_array = [ | 
| 78 | 
            -
                                    f" | 
| 79 | 
            -
                                    f"The paper begins now: \n{frag}" for frag in pfg.sp_file_contents]
         | 
| 80 | 
             
                    inputs_show_user_array = [f"Polish {f}" for f in pfg.sp_file_tag]
         | 
| 81 | 
             
                    sys_prompt_array = ["You are a professional academic paper writer." for _ in range(n_split)]
         | 
| 82 | 
             
                elif language == 'zh':
         | 
| @@ -97,6 +96,7 @@ def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch | |
| 97 | 
             
                    scroller_max_len = 80
         | 
| 98 | 
             
                )
         | 
| 99 |  | 
|  | |
| 100 | 
             
                create_report_file_name = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + f"-chatgpt.polish.md"
         | 
| 101 | 
             
                res = write_results_to_file(gpt_response_collection, file_name=create_report_file_name)
         | 
| 102 | 
             
                history = gpt_response_collection
         | 
|  | |
| 72 | 
             
                #     sys_prompt="Your job is to collect information from materials。",
         | 
| 73 | 
             
                # )
         | 
| 74 |  | 
| 75 | 
            +
                #  <-------- 多线程润色开始 ----------> 
         | 
| 76 | 
             
                if language == 'en':
         | 
| 77 | 
            +
                    inputs_array = ["Below is a section from an academic paper, polish this section to meet the academic standard, improve the grammar, clarity and overall readability, do not modify any latex command such as \section, \cite and equations:" + 
         | 
| 78 | 
            +
                                    f"\n\n{frag}" for frag in pfg.sp_file_contents]
         | 
|  | |
| 79 | 
             
                    inputs_show_user_array = [f"Polish {f}" for f in pfg.sp_file_tag]
         | 
| 80 | 
             
                    sys_prompt_array = ["You are a professional academic paper writer." for _ in range(n_split)]
         | 
| 81 | 
             
                elif language == 'zh':
         | 
|  | |
| 96 | 
             
                    scroller_max_len = 80
         | 
| 97 | 
             
                )
         | 
| 98 |  | 
| 99 | 
            +
                #  <-------- 整理结果,退出 ----------> 
         | 
| 100 | 
             
                create_report_file_name = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + f"-chatgpt.polish.md"
         | 
| 101 | 
             
                res = write_results_to_file(gpt_response_collection, file_name=create_report_file_name)
         | 
| 102 | 
             
                history = gpt_response_collection
         |