mirror of
https://codeberg.org/aryak/mozhi
synced 2025-06-04 00:41:07 +05:30
add tesseract support
This commit is contained in:
@@ -3,7 +3,6 @@ package utils
|
||||
import (
|
||||
"github.com/gocolly/colly"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func TranslateGoogle(to string, from string, query string) string {
|
||||
|
13
utils/imgtxt.go
Normal file
13
utils/imgtxt.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/otiai10/gosseract/v2"
|
||||
)
|
||||
|
||||
func ImgTxt(file string) string {
|
||||
client := gosseract.NewClient()
|
||||
defer client.Close()
|
||||
client.SetImage(file)
|
||||
text, _ := client.Text()
|
||||
return text
|
||||
}
|
Reference in New Issue
Block a user