Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meme_image
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘续中
meme_image
Commits
a21fc467
Commit
a21fc467
authored
Jun 19, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update aonweb
parent
fb1d87b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3254 additions
and
243 deletions
+3254
-243
package-lock.json
package-lock.json
+3233
-225
package.json
package.json
+1
-1
Index.vue
src/views/Index.vue
+20
-17
No files found.
package-lock.json
View file @
a21fc467
This source diff could not be displayed because it is too large. You can
view the blob
instead.
package.json
View file @
a21fc467
...
...
@@ -11,7 +11,7 @@
"type-check"
:
"vue-tsc --build --force"
},
"dependencies"
:
{
"
aonweb
"
:
"
^0.0.
5
"
,
"
aonweb
"
:
"
^0.0.
7
"
,
"
aos
"
:
"
^2.3.4
"
,
"
axios
"
:
"
^1.6.8
"
,
"
element-plus
"
:
"
^2.7.5
"
,
...
...
src/views/Index.vue
View file @
a21fc467
...
...
@@ -75,7 +75,7 @@ import { ref, onMounted } from 'vue';
import
{
showToast
}
from
'
vant
'
;
import
{
useRouter
}
from
'
vue-router
'
import
{
AI
}
from
'
aonweb
'
import
{
AI
,
AIOptions
}
from
'
aonweb
'
import
{
getTemplate
}
from
'
../lib/getTemplate
'
import
'
vant/lib/index.css
'
;
...
...
@@ -164,29 +164,32 @@ const formSubmit = async () => {
showLoading
.
value
=
true
try
{
// AI 使用方法
const
ai_options
=
{
//Please replace with your own API key or jwt token.
auth
:
"
Rbhpcp0FKNrYNA1nZkrwrIbD0YSSRlVG
"
,
appid
:
""
// host: "http://localhost:8080"
}
const
ai_options
=
new
AIOptions
({
appId
:
'
test
'
})
const
aonet
=
new
AI
(
ai_options
)
const
data
=
{
input
:
{
"
image
"
:
submitImgUrl
.
value
,
"
style
"
:
"
3D
"
,
"
prompt
"
:
prompt
.
value
,
"
negative_prompt
"
:
""
,
"
prompt_strength
"
:
4.5
,
"
denoising_strength
"
:
1
,
"
instant_id_strength
"
:
0.8
input
:{
"
prompt
"
:
""
,
"
cfg_scale
"
:
1.2
,
"
num_steps
"
:
4
,
"
image_width
"
:
768
,
"
num_samples
"
:
1
,
"
image_height
"
:
1024
,
"
output_format
"
:
"
webp
"
,
"
identity_scale
"
:
0.8
,
"
mix_identities
"
:
false
,
"
output_quality
"
:
80
,
"
generation_mode
"
:
"
fidelity
"
,
"
main_face_image
"
:
submitImgUrl
.
value
,
"
negative_prompt
"
:
""
}
}
console
.
log
(
"
formSubmit data
"
,
data
)
let
price
=
1
2.5
let
response
=
await
aonet
.
prediction
(
"
/predictions/ai/
face-to-many
"
,
data
,
price
)
let
price
=
1
0
let
response
=
await
aonet
.
prediction
(
"
/predictions/ai/
pulid
"
,
data
,
price
)
console
.
log
(
"
test
"
,
response
)
if
(
response
.
task
.
exec_code
==
200
&&
response
.
task
.
is_success
)
{
showLoading
.
value
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment