Commit a21fc467 authored by brent's avatar brent

update aonweb

parent fb1d87b0
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"type-check": "vue-tsc --build --force" "type-check": "vue-tsc --build --force"
}, },
"dependencies": { "dependencies": {
"aonweb": "^0.0.5", "aonweb": "^0.0.7",
"aos": "^2.3.4", "aos": "^2.3.4",
"axios": "^1.6.8", "axios": "^1.6.8",
"element-plus": "^2.7.5", "element-plus": "^2.7.5",
......
...@@ -75,7 +75,7 @@ import { ref, onMounted } from 'vue'; ...@@ -75,7 +75,7 @@ import { ref, onMounted } from 'vue';
import { showToast } from 'vant'; import { showToast } from 'vant';
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { AI } from 'aonweb' import { AI,AIOptions} from 'aonweb'
import { getTemplate } from '../lib/getTemplate' import { getTemplate } from '../lib/getTemplate'
import 'vant/lib/index.css'; import 'vant/lib/index.css';
...@@ -164,29 +164,32 @@ const formSubmit = async () => { ...@@ -164,29 +164,32 @@ const formSubmit = async () => {
showLoading.value = true showLoading.value = true
try { try {
// AI 使用方法 // AI 使用方法
const ai_options = { const ai_options = new AIOptions({
//Please replace with your own API key or jwt token. appId :'test'
auth: "Rbhpcp0FKNrYNA1nZkrwrIbD0YSSRlVG", })
appid: ""
// host: "http://localhost:8080"
}
const aonet = new AI(ai_options) const aonet = new AI(ai_options)
const data = { const data = {
input: { input:{
"image": submitImgUrl.value, "prompt": "",
"style": "3D", "cfg_scale": 1.2,
"prompt": prompt.value, "num_steps": 4,
"negative_prompt": "", "image_width": 768,
"prompt_strength": 4.5, "num_samples": 1,
"denoising_strength": 1, "image_height": 1024,
"instant_id_strength": 0.8 "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) console.log("formSubmit data", data)
let price = 12.5 let price = 10
let response = await aonet.prediction("/predictions/ai/face-to-many", data,price) let response = await aonet.prediction("/predictions/ai/pulid", data,price)
console.log("test", response) console.log("test", response)
if (response.task.exec_code == 200 && response.task.is_success) { if (response.task.exec_code == 200 && response.task.is_success) {
showLoading.value = false showLoading.value = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment