rogerxavier commited on
Commit
4967d16
1 Parent(s): a6d57ff

Update 1removeMask.py

Browse files
Files changed (1) hide show
  1. 1removeMask.py +2 -2
1removeMask.py CHANGED
@@ -55,8 +55,8 @@ 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
- 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)
 
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("请求lama clenaer状态是",resp.status_code)
59
+ return bytes(resp.content)
60
 
61
  def save_img(img_content:"要处理的图片数据",new_save_path:"新文件的保存路径(包含后缀)",old_img_path:"旧文件路径")->"void生成新的文件保存 ,传入旧文件路径是为了删除有问题的旧文件":
62
  print(new_save_path)