mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 02:33:42 +08:00
feat: add system config item for reward image, add app config item to use custom text2img param json file
This commit is contained in:
@@ -2,16 +2,13 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"path"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
imgURL := "https://www.baidu.com/static/upload/2023/10/1696497571220711277.png?ex=6530f4a2&is=651e7fa28hmFd709d069ca05d7855ebdae42e5aa436883a36f9310d546"
|
||||
parse, err := url.Parse(imgURL)
|
||||
bytes, err := os.ReadFile("res/text2img.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println(path.Ext(parse.Path))
|
||||
fmt.Println(string(bytes))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user