small fix

This commit is contained in:
xunbu
2025-05-11 23:12:52 +08:00
parent eecc7f302a
commit a5ad9e3d90
3 changed files with 6 additions and 3 deletions

2
.idea/workspace.xml generated
View File

@@ -5,6 +5,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="6b18b44a-df57-4212-a857-9e291ebe5dd2" name="更改" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app.spec" beforeDir="false" afterPath="$PROJECT_DIR$/app.spec" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docutranslate/translater.py" beforeDir="false" afterPath="$PROJECT_DIR$/docutranslate/translater.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />

View File

@@ -58,7 +58,7 @@ exe = EXE(
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,

View File

@@ -32,8 +32,9 @@ class FileTranslater:
self.model_id: str = model_id
self.temperature = temperature
if docling_artifact is None:
artifact_path=Path("artifact")
if artifact_path.exists():
artifact_path=Path("./artifact")
if artifact_path.is_dir():
translater_logger.info("检测到artifact文件夹")
self.docling_artifact=artifact_path
self.docling_artifact = docling_artifact
self.timeout = timeout