Spaces:
Build error
Build error
fix interactive and header
Browse files120 unmodified lines121122123124124125126127120 unmodified lines cfg_scale = gr.Slider(value=0.5, minimum=0.0, maximum=1.0, step=0.1, label="Edit/Text Strength (CFG)", interactive=True) with gr.Row(): input_image = gr.Image(label="Input Image", type="pil", interactive=False, input_image = gr.Image(label="Input Image", type="pil", interactive=True, height=resolution, width=resolution) edited_image = gr.Image(label="Edited Image", type="pil", interactive=False, height=resolution, width=resolution)17 unmodified lines181920212223242521222340 unmodified lines6465667267686939 unmodified lines10911011111811211311417 unmodified lines# 接口 URLt2i_url = 'https://magicarena.bytedance.com/api/evaluate/v1/algo/process'
#注意:正式上线环境需要不设置headerheaders = { 'X-TT-ENV': 'ppe_general_20', 'X-USE-PPE': '1'}
APP_KEY = os.environ['APP_KEY']SECRET_KEY = os.environ["SECRET_KEY"]40 unmodified lines # 请求发送 response = requests.post( t2i_url, headers=headers, data=json.dumps({ 'AlgoType': 1, 'ReqJson': req_json,39 unmodified lines # 请求发送 response = requests.post( t2i_url, headers=headers, data=json.dumps({ 'AlgoType': 2, 'ReqJson': req_json,app.py+1-1
caller.py-7