•  


移除冗余代? · binary-husky/gpt_academic@9d25f8d · GitHub
Skip to content

Commit

Permalink
移除冗余代?
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-sky committed Nov 19, 2023
1 parent 977f992 commit 9d25f8d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 28 deletions .
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,6 @@
# 自定?按?的最大?量限制
NUM_CUSTOM_BASIC_BTN = 4


# LATEX??性功能
LATEX_EXPERIMENTAL = False


"""
在?大模型配置???系示意?
Expand Down
23 changes: 13 additions & 10 deletions crazy_functions/latex_fns/latex_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ def __init__(self) -> None:
self . abstract = "unknown"

def read_title_and_abstract ( self , txt ):
title , abstract = find_title_and_abs ( txt )
if title is not None :
self . title = title . replace ( ' \n ' , ' ' ). replace ( ' \\ \\ ' , ' ' ). replace ( ' ' , '' ). replace ( ' ' , '' )
if abstract is not None :
self . abstract = abstract . replace ( ' \n ' , ' ' ). replace ( ' \\ \\ ' , ' ' ). replace ( ' ' , '' ). replace ( ' ' , '' )
try :
title , abstract = find_title_and_abs ( txt )
if title is not None :
self . title = title . replace ( ' \n ' , ' ' ). replace ( ' \\ \\ ' , ' ' ). replace ( ' ' , '' ). replace ( ' ' , '' )
if abstract is not None :
self . abstract = abstract . replace ( ' \n ' , ' ' ). replace ( ' \\ \\ ' , ' ' ). replace ( ' ' , '' ). replace ( ' ' , '' )
except :
pass

def merge_result ( self , arr , mode , msg , buggy_lines = [], buggy_line_surgery_n_lines = 10 ):
"""
Expand Down Expand Up @@ -265,12 +268,12 @@ def Latex精?分解??化(file_manifest, project_folder, llm_kwargs, plugin

else :
# <-------- gpt 多?程?求 ---------->
LATEX_EXPERIMENTAL , = get_conf ( 'LATEX_EXPERIMENTAL' )
history_array = [[ "" ] for _ in range ( n_split )]
if LATEX_EXPERIMENTAL :
paper_meta = f"The paper you processing is ` { lps . title } `, a part of the abstraction is ` { lps . abstract } `"
paper_meta_max_len = 888
history_array = [[ paper_meta [: paper_meta_max_len ] + '...' , "Understand, what should I do?" ] for _ in range ( n_split )]
# LATEX_EXPERIMENTAL, = get_conf('LATEX_EXPERIMENTAL')
# if LATEX_EXPERIMENTAL:
# paper_meta = f"The paper you processing is `{lps.title}`, a part of the abstraction is `{lps.abstract}`"
# paper_meta_max_len = 888
# history_array = [[ paper_meta[:paper_meta_max_len] + '...', "Understand, what should I do?"] for _ in range(n_split)]

gpt_response_collection = yield from request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency (
inputs_array = inputs_array ,
Expand Down
1 change: 1 addition & 0 deletions crazy_functions/latex_fns/latex_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def extract_title(string):
title = extract_title ( main_file )
return title , abstract


def merge_tex_files ( project_foler , main_file , mode ):
"""
Merge Tex project recrusively
Expand Down
4 changes: 2 additions & 2 deletions toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ def find_recent_files(directory):


def file_already_in_downloadzone ( file , user_path ):
parent_path = user_path
child_path = file
parent_path = os . path . abspath ( user_path )
child_path = os . path . abspath ( file )
if os . path . commonpath ([ parent_path , child_path ]) == parent_path :
return True
else :
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 3.60,
"show_feature": true,
"new_feature": " 11月12日?急BUG修? <-> AutoGen多智能??件??版 <-> 修?本地模型在Windows下的加?BUG <-> 支持文心一言v4和星火v3 <-> 支持GLM3和智?的API <-> 解?本地模型??BUG <-> 支持??追加基?功能按? <-> 新??PDF???面 <-> 重新??Gradio?化使用??"
"new_feature": " 修?多?BUG <-> AutoGen多智能??件??版 <-> 修?本地模型在Windows下的加?BUG <-> 支持文心一言v4和星火v3 <-> 支持GLM3和智?的API <-> 解?本地模型??BUG <-> 支持??追加基?功能按? <-> 新??PDF???面 <-> 重新??Gradio?化使用??"
}

0 comments on commit 9d25f8d

Please sign in to comment.
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본