增加提示
This commit is contained in:
@@ -1 +1 @@
|
|||||||
__version__="1.1.6"
|
__version__="1.2.0"
|
||||||
@@ -801,8 +801,8 @@ async def service_release_task(task_id: str):
|
|||||||
except HTTPException as e:
|
except HTTPException as e:
|
||||||
print(f"[{task_id}] 取消任务时出现预期中的情况(可能已完成): {e.detail}")
|
print(f"[{task_id}] 取消任务时出现预期中的情况(可能已完成): {e.detail}")
|
||||||
message_parts.append(f"任务取消步骤已跳过(可能已完成或取消)。")
|
message_parts.append(f"任务取消步骤已跳过(可能已完成或取消)。")
|
||||||
tasks_state.pop(task_id, None);
|
tasks_state.pop(task_id, None)
|
||||||
tasks_log_queues.pop(task_id, None);
|
tasks_log_queues.pop(task_id, None)
|
||||||
tasks_log_histories.pop(task_id, None)
|
tasks_log_histories.pop(task_id, None)
|
||||||
print(f"[{task_id}] 资源已成功释放。")
|
print(f"[{task_id}] 资源已成功释放。")
|
||||||
message_parts.append(f"任务 '{task_id}' 的资源已释放。")
|
message_parts.append(f"任务 '{task_id}' 的资源已释放。")
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class ConverterMineruConfig(X2MarkdownConverterConfig):
|
|||||||
model_version: Literal["pipline", "vlm"] = "vlm"
|
model_version: Literal["pipline", "vlm"] = "vlm"
|
||||||
|
|
||||||
def gethash(self) -> Hashable:
|
def gethash(self) -> Hashable:
|
||||||
return (self.formula_ocr,self.model_version)
|
return self.formula_ocr,self.model_version
|
||||||
|
|
||||||
|
|
||||||
timeout = httpx.Timeout(
|
timeout = httpx.Timeout(
|
||||||
@@ -127,7 +127,7 @@ class ConverterMineru(X2MarkdownConverter):
|
|||||||
await asyncio.sleep(3)
|
await asyncio.sleep(3)
|
||||||
|
|
||||||
def convert(self, document: Document) -> MarkdownDocument:
|
def convert(self, document: Document) -> MarkdownDocument:
|
||||||
self.logger.info(f"正在将文档转换为markdown")
|
self.logger.info(f"正在将文档转换为markdown,model_version:{self.model_version}")
|
||||||
time1 = time.time()
|
time1 = time.time()
|
||||||
batch_id = self.upload(document)
|
batch_id = self.upload(document)
|
||||||
file_url = self.get_file_url(batch_id)
|
file_url = self.get_file_url(batch_id)
|
||||||
@@ -137,7 +137,7 @@ class ConverterMineru(X2MarkdownConverter):
|
|||||||
return md_document
|
return md_document
|
||||||
|
|
||||||
async def convert_async(self, document: Document) -> MarkdownDocument:
|
async def convert_async(self, document: Document) -> MarkdownDocument:
|
||||||
self.logger.info(f"正在将文档转换为markdown")
|
self.logger.info(f"正在将文档转换为markdown,model_version:{self.model_version}")
|
||||||
time1 = time.time()
|
time1 = time.time()
|
||||||
batch_id = await self.upload_async(document)
|
batch_id = await self.upload_async(document)
|
||||||
file_url = await self.get_file_url_async(batch_id)
|
file_url = await self.get_file_url_async(batch_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user