Spaces:
Sleeping
Sleeping
Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -65,7 +65,7 @@
|
|
65 |
// Process the image with Tesseract
|
66 |
Tesseract.recognize(
|
67 |
dataURL,
|
68 |
-
'
|
69 |
{
|
70 |
logger: m => console.log(m)
|
71 |
}
|
@@ -79,7 +79,7 @@
|
|
79 |
|
80 |
|
81 |
// Extract nutritional values (assuming sugar content is labeled as '당류' in Korean)
|
82 |
-
const regex =
|
83 |
const match = text.match(regex);
|
84 |
|
85 |
|
|
|
65 |
// Process the image with Tesseract
|
66 |
Tesseract.recognize(
|
67 |
dataURL,
|
68 |
+
'eng',
|
69 |
{
|
70 |
logger: m => console.log(m)
|
71 |
}
|
|
|
79 |
|
80 |
|
81 |
// Extract nutritional values (assuming sugar content is labeled as '당류' in Korean)
|
82 |
+
const regex = /sugar\s*:\s*(\d+(\.\d+)?)\s*g\s*/; // This regex might need adjustments based on label format
|
83 |
const match = text.match(regex);
|
84 |
|
85 |
|