Spaces:
Build error
Build error
Commit ·
fddbcc2
1
Parent(s): d659855
24 unmodified lines2526272829303132333435363752 unmodified lines909192939495964 unmodified lines10110210310410510610741 unmodified lines149150151152153154155215 unmodified lines37137237337437537637724 unmodified linesif not os.path.exists('gray256.jpg'):os.system('wget https://huggingface.co/JingyeChen22/textdiffuser2-full-ft/blob/main/gray256.jpg')print(os.system('apt install mlocate'))print(os.system('ls'))print(os.system('pwd'))print(os.system('locate gray256.jpg'))# img = Image.open('locate gray256.jpg')# print(img.size)exit(0)# #### import m1# from fastchat.model import load_model, get_conversation_template52 unmodified linesglobal statestate = 0stack = []image = Image.open(f'{os.getcwd()}/gray256.jpg')print('stack', stack)return image4 unmodified linesif len(stack) > 0:stack.pop()image = Image.open(f'{os.getcwd()}/gray256.jpg')draw = ImageDraw.Draw(image)for items in stack:41 unmodified linesstate = 0image = Image.open(f'{os.getcwd()}/gray256.jpg')draw = ImageDraw.Draw(image)for items in stack:215 unmodified lines# 这里加一个会话框with gr.Row():with gr.Column(scale=1):i = gr.Image(label="Template", type='filepath', value=f'{os.getcwd()}/gray256.jpg', height=256, width=256)with gr.Column(scale=3):t = gr.Textbox(label="Template", placeholder='keyword')redo = gr.Button(value='Redo - Cancel the last keyword') # 如何给b绑定事件24 unmodified lines2526272829303132333435363752 unmodified lines909192939495964 unmodified lines10110210310410510610741 unmodified lines149150151152153154155215 unmodified lines37137237337437537637724 unmodified linesif not os.path.exists('gray256.jpg'):os.system('wget https://huggingface.co/JingyeChen22/textdiffuser2-full-ft/blob/main/gray256.jpg')# print(os.system('apt install mlocate'))# print(os.system('ls'))# print(os.system('pwd'))# print(os.system('locate gray256.jpg'))# # img = Image.open('locate gray256.jpg')# # print(img.size)# exit(0)# #### import m1# from fastchat.model import load_model, get_conversation_template52 unmodified linesglobal statestate = 0stack = []image = Image.open(f'./gray256.jpg')print('stack', stack)return image4 unmodified linesif len(stack) > 0:stack.pop()image = Image.open(f'./gray256.jpg')draw = ImageDraw.Draw(image)for items in stack:41 unmodified linesstate = 0image = Image.open(f'./gray256.jpg')draw = ImageDraw.Draw(image)for items in stack:215 unmodified lines# 这里加一个会话框with gr.Row():with gr.Column(scale=1):i = gr.Image(label="Template", type='filepath', value=f'./gray256.jpg', height=256, width=256)with gr.Column(scale=3):t = gr.Textbox(label="Template", placeholder='keyword')redo = gr.Button(value='Redo - Cancel the last keyword') # 如何给b绑定事件
app.py+11-11