Spaces:
Build error
Build error
Commit ·
fddbcc2
1
Parent(s): d659855
24 unmodified lines252627282930313233342829303132333435363752 unmodified lines90919293939495964 unmodified lines10110210310410410510610741 unmodified lines149150151152152153154155215 unmodified lines37137237337437437537637724 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)# 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 lines global state state = 0 stack = [] image = Image.open(f'{os.getcwd()}/gray256.jpg') image = Image.open(f'./gray256.jpg') print('stack', stack) return image
4 unmodified lines
if len(stack) > 0: stack.pop() image = Image.open(f'{os.getcwd()}/gray256.jpg') image = Image.open(f'./gray256.jpg') draw = ImageDraw.Draw(image)
for items in stack:41 unmodified lines state = 0
image = Image.open(f'{os.getcwd()}/gray256.jpg') image = 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'{os.getcwd()}/gray256.jpg', height=256, width=256) 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