fix: change API version to v2.0 (#444)
This commit is contained in:
Родитель
626c4f48c0
Коммит
015109e532
|
@ -17,7 +17,7 @@ def runAnalysis(input_file, output_file, file_type):
|
||||||
apim_key = "<subscription_key>"
|
apim_key = "<subscription_key>"
|
||||||
# Model ID
|
# Model ID
|
||||||
model_id = "<model_id>"
|
model_id = "<model_id>"
|
||||||
post_url = endpoint + "/formrecognizer/v2.0-preview/custom/models/%s/analyze" % model_id
|
post_url = endpoint + "/formrecognizer/v2.0/custom/models/%s/analyze" % model_id
|
||||||
params = {
|
params = {
|
||||||
"includeTextDetails": True
|
"includeTextDetails": True
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const constants = {
|
||||||
convertedImageQuality: 0.7,
|
convertedImageQuality: 0.7,
|
||||||
convertedThumbnailQuality: 0.2,
|
convertedThumbnailQuality: 0.2,
|
||||||
|
|
||||||
apiModelsPath: "/formrecognizer/v2.0-preview/custom/models",
|
apiModelsPath: "/formrecognizer/v2.0/custom/models",
|
||||||
|
|
||||||
pdfjsWorkerSrc(version: string) {
|
pdfjsWorkerSrc(version: string) {
|
||||||
return `//fotts.azureedge.net/npm/pdfjs-dist/${version}/pdf.worker.js`;
|
return `//fotts.azureedge.net/npm/pdfjs-dist/${version}/pdf.worker.js`;
|
||||||
|
|
|
@ -84,7 +84,7 @@ export class OCRService {
|
||||||
try {
|
try {
|
||||||
const headers = { "Content-Type": "application/json" };
|
const headers = { "Content-Type": "application/json" };
|
||||||
const response = await ServiceHelper.postWithAutoRetry(
|
const response = await ServiceHelper.postWithAutoRetry(
|
||||||
this.project.apiUriBase + "/formrecognizer/v2.0-preview/layout/analyze",
|
this.project.apiUriBase + "/formrecognizer/v2.0/layout/analyze",
|
||||||
{ url: filePath },
|
{ url: filePath },
|
||||||
{ headers },
|
{ headers },
|
||||||
this.project.apiKey as string,
|
this.project.apiKey as string,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче