0
0
forked from flt/tools

First commit

Former-commit-id: 424079609133edcc501ae185509836ee1181a02c
This commit is contained in:
2022-06-12 19:47:20 +08:00
commit f6658f3d52
51 changed files with 82841 additions and 0 deletions

24
change_font/bg.py Normal file
View File

@ -0,0 +1,24 @@
from req import Req
from json import dump
from time import sleep
from base64 import b64decode
import pickle
# cnter='7'
url="https://openai.100tal.com/aiimage/comeducation"
# file=f"opt/{str(cnter)}new.jpg"
file="opt/DINGTALK_IM_1659828452.JPGnew.JPG"
req=Req(warn=False)
if not req.ready:
id=input("ID: ")
sec=input("Secret: ")
req.set(id,sec)
bgpic=req("http://openai.100tal.com/aiimage/handwriting-erase",file)
if bgpic["code"]!=20000:
print(bgpic)
with open("bg.json","w",encoding="utf-8") as f:
dump(bgpic,f)
exit(-1)
with open("bg.png","wb") as f:
f.write(b64decode(bgpic["image_base64"]))