rogerxavier commited on
Commit
a6d57ff
1 Parent(s): bc39f3a

Update 1removeMask.py

Browse files
Files changed (1) hide show
  1. 1removeMask.py +2 -0
1removeMask.py CHANGED
@@ -55,10 +55,12 @@ def inpaint(img_path:str,mask_path:str)->"img content (resp.content)":
55
 
56
  # resp = requests.post("https://sanster-lama-cleaner-lama.hf.space/inpaint",data= payload,files=files)##huggingface版本
57
  resp = requests.post("https://sanster-lama-cleaner-lama.hf.space/inpaint", data=payload, files=files)
 
58
  return resp.content
59
 
60
  def save_img(img_content:"要处理的图片数据",new_save_path:"新文件的保存路径(包含后缀)",old_img_path:"旧文件路径")->"void生成新的文件保存 ,传入旧文件路径是为了删除有问题的旧文件":
61
  print(new_save_path)
 
62
  try:
63
  img = Image.open(io.BytesIO(img_content))
64
  # 如果需要指定图像格式,可以在保存时指定
 
55
 
56
  # resp = requests.post("https://sanster-lama-cleaner-lama.hf.space/inpaint",data= payload,files=files)##huggingface版本
57
  resp = requests.post("https://sanster-lama-cleaner-lama.hf.space/inpaint", data=payload, files=files)
58
+ print("resp返回是",resp.text)
59
  return resp.content
60
 
61
  def save_img(img_content:"要处理的图片数据",new_save_path:"新文件的保存路径(包含后缀)",old_img_path:"旧文件路径")->"void生成新的文件保存 ,传入旧文件路径是为了删除有问题的旧文件":
62
  print(new_save_path)
63
+ print("img_content返回是:",img_content)
64
  try:
65
  img = Image.open(io.BytesIO(img_content))
66
  # 如果需要指定图像格式,可以在保存时指定