add remove_background tool
This commit is contained in:
parent
47517a1e55
commit
7b150fc3b2
@ -93,7 +93,7 @@ const router = createRouter({
|
||||
{
|
||||
path: 'tools/remove-background',
|
||||
name: 'RemoveBackground',
|
||||
component: () => import('../../views/tools/RemoveBackground.vue')
|
||||
component: () => import('../../views/tools/remove_background/remove_background.vue')
|
||||
},
|
||||
{
|
||||
path: 'search',
|
||||
|
||||
@ -408,7 +408,7 @@ const handleRemoveBackground = async () => {
|
||||
const base64Data = await base64Promise
|
||||
|
||||
const response = await axios.post(
|
||||
'/jingrow.tools.tools.remove_background',
|
||||
'/jingrow.tools.remove_background.remove_background.remove_background_from_file',
|
||||
{
|
||||
image_data: base64Data
|
||||
},
|
||||
@ -1,11 +1,6 @@
|
||||
# Copyright (c) 2025, JINGROW and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
"""
|
||||
Jingrow Tools API
|
||||
提供各种工具服务的API端点
|
||||
"""
|
||||
|
||||
import base64
|
||||
import requests
|
||||
from typing import Dict, Any, Union
|
||||
@ -18,7 +13,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@jingrow.whitelist()
|
||||
def remove_background(image_data: Union[str, list]) -> Dict[str, Any]:
|
||||
def remove_background_from_file(image_data: Union[str, list]) -> Dict[str, Any]:
|
||||
"""
|
||||
图片去背景工具
|
||||
调用 Jingrow Cloud API 实现图片背景移除
|
||||
Loading…
x
Reference in New Issue
Block a user