加速错题 OCR:上传压缩、识别缩放、启动预热与 MKL-DNN。
This commit is contained in:
@@ -37,7 +37,7 @@ export default function WrongQuestionDetail({
|
||||
try {
|
||||
const { data } = await wrongQuestionApi.get(questionId)
|
||||
setWq(data)
|
||||
setQuestionText(data.question_text || '')
|
||||
setQuestionText(data.question_text || data.ocr_raw_text || '')
|
||||
setApproachText(data.solution_approach || '')
|
||||
setSolutionText(data.solution_text || '')
|
||||
setImageMode(data.has_annotated_image ? 'annotated' : 'original')
|
||||
@@ -56,7 +56,7 @@ export default function WrongQuestionDetail({
|
||||
try {
|
||||
const { data } = await wrongQuestionApi.get(questionId)
|
||||
setWq(data)
|
||||
setQuestionText(data.question_text || '')
|
||||
setQuestionText(data.question_text || data.ocr_raw_text || '')
|
||||
setApproachText(data.solution_approach || '')
|
||||
setSolutionText(data.solution_text || '')
|
||||
if (data.has_annotated_image) setImageMode('annotated')
|
||||
@@ -88,7 +88,7 @@ export default function WrongQuestionDetail({
|
||||
try {
|
||||
const { data } = await wrongQuestionApi.regenerate(questionId)
|
||||
setWq(data)
|
||||
setQuestionText(data.question_text || '')
|
||||
setQuestionText(data.question_text || data.ocr_raw_text || '')
|
||||
setApproachText(data.solution_approach || '')
|
||||
setSolutionText(data.solution_text || '')
|
||||
message.success('解题思路已重新生成')
|
||||
|
||||
@@ -9,10 +9,10 @@ export function isWrongQuestionProcessing(wq: WrongQuestion): boolean {
|
||||
|
||||
export function processingHint(wq: WrongQuestion): string {
|
||||
if (wq.status === 'pending') {
|
||||
return '正在 OCR 识别(首次约 1–5 分钟,请稍候)…'
|
||||
return '正在识别文字(约 10–30 秒)…'
|
||||
}
|
||||
if (wq.status === 'ocr_done') {
|
||||
return '正在标注错题并生成解题思路…'
|
||||
return '正在标注错题并生成解题思路(约 30–90 秒)…'
|
||||
}
|
||||
return '正在识别、标注并生成解题思路…'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user