mirror of
https://codeberg.org/aryak/mozhi
synced 2024-11-18 11:42:57 +05:30
14 lines
215 B
Go
14 lines
215 B
Go
|
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
|
||
|
}
|