文档注释
This commit is contained in:
@@ -233,6 +233,10 @@ go build bin/main.go
|
|||||||
|
|
||||||
# 上传到服务器
|
# 上传到服务器
|
||||||
scp ./main root@47.103.40.152:~/main
|
scp ./main root@47.103.40.152:~/main
|
||||||
|
|
||||||
|
# 图像转向量(为了更快速度它应当运行在GPU服务器上)
|
||||||
|
python3 api/resnet.py
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,6 +30,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
|||||||
// 文章的可选字段
|
// 文章的可选字段
|
||||||
article := graphql.NewObject(graphql.ObjectConfig{
|
article := graphql.NewObject(graphql.ObjectConfig{
|
||||||
Name: "Article",
|
Name: "Article",
|
||||||
|
Description: "文章信息",
|
||||||
Fields: graphql.Fields{
|
Fields: graphql.Fields{
|
||||||
"id": &graphql.Field{Type: graphql.Int},
|
"id": &graphql.Field{Type: graphql.Int},
|
||||||
"title": &graphql.Field{Type: graphql.String},
|
"title": &graphql.Field{Type: graphql.String},
|
||||||
@@ -42,6 +43,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
|||||||
// 用户的可选字段
|
// 用户的可选字段
|
||||||
user := graphql.NewObject(graphql.ObjectConfig{
|
user := graphql.NewObject(graphql.ObjectConfig{
|
||||||
Name: "User",
|
Name: "User",
|
||||||
|
Description: "用户信息",
|
||||||
Fields: graphql.Fields{
|
Fields: graphql.Fields{
|
||||||
"id": &graphql.Field{Type: graphql.Int},
|
"id": &graphql.Field{Type: graphql.Int},
|
||||||
"user_name": &graphql.Field{Type: graphql.String},
|
"user_name": &graphql.Field{Type: graphql.String},
|
||||||
@@ -56,6 +58,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
|||||||
// 图像中的文字提取
|
// 图像中的文字提取
|
||||||
text := graphql.NewObject(graphql.ObjectConfig{
|
text := graphql.NewObject(graphql.ObjectConfig{
|
||||||
Name: "Text",
|
Name: "Text",
|
||||||
|
Description: "图像中的文字提取",
|
||||||
Fields: graphql.Fields{
|
Fields: graphql.Fields{
|
||||||
"text": &graphql.Field{Type: graphql.String},
|
"text": &graphql.Field{Type: graphql.String},
|
||||||
"confidence": &graphql.Field{Type: graphql.Float},
|
"confidence": &graphql.Field{Type: graphql.Float},
|
||||||
@@ -68,6 +71,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
|
|||||||
// 图像的可选字段
|
// 图像的可选字段
|
||||||
image := graphql.NewObject(graphql.ObjectConfig{
|
image := graphql.NewObject(graphql.ObjectConfig{
|
||||||
Name: "Image",
|
Name: "Image",
|
||||||
|
Description: "图像信息",
|
||||||
Fields: graphql.Fields{
|
Fields: graphql.Fields{
|
||||||
"id": &graphql.Field{Type: graphql.Int},
|
"id": &graphql.Field{Type: graphql.Int},
|
||||||
"width": &graphql.Field{Type: graphql.Int},
|
"width": &graphql.Field{Type: graphql.Int},
|
||||||
|
Reference in New Issue
Block a user