diff --git a/web/src/lib/Figure.svelte b/web/src/lib/Figure.svelte index 64692bb..6f258e6 100644 --- a/web/src/lib/Figure.svelte +++ b/web/src/lib/Figure.svelte @@ -1,5 +1,6 @@
@@ -74,7 +103,15 @@
{entry.key}: {#if typeof entry.value === 'object'} -
{JSON.stringify(entry.value, null, 2)}
+ {#if isValidOCRDataStructure(entry.value)} + + {:else} +
{JSON.stringify(
+										entry.value,
+										null,
+										2
+									)}
+ {/if} {:else} {entry.value} {/if} diff --git a/web/src/lib/OCRTable.svelte b/web/src/lib/OCRTable.svelte new file mode 100644 index 0000000..3530382 --- /dev/null +++ b/web/src/lib/OCRTable.svelte @@ -0,0 +1,22 @@ + + + + + + + + + + {#each ocrData as { dt_boxes, rec_txt, score }} + + + + + {/each} + +
TextScore
{rec_txt}{score.toFixed(3)}
\ No newline at end of file