Spaces:
Running
Running
Update
Browse files14 unmodified lines151617181920212281 unmodified lines1041051061071081091101111121131145 unmodified lines12012112212312412512612712812913014 unmodified linesimport PIL.Imageimport tensorflow as tfTOKEN = os.environ['TOKEN']MODEL_REPO = 'hysts/DeepDanbooru'MODEL_FILENAME = 'model-resnet_custom_v3.h5'LABEL_FILENAME = 'tags.txt'81 unmodified linesfunc = functools.partial(predict, model=model, labels=labels)func = functools.update_wrapper(func, predict)repo_url = 'https://github.com/KichangKim/DeepDanbooru'title = 'KichangKim/DeepDanbooru'description = f'A demo for {repo_url}'article = Nonegr.Interface(func,[5 unmodified lineslabel='Score Threshold'),],gr.outputs.Label(label='Output'),theme=args.theme,title=title,description=description,article=article,examples=examples,allow_screenshot=args.allow_screenshot,allow_flagging=args.allow_flagging,live=args.live,14 unmodified lines15161718192021222324252681 unmodified lines1081091101111121135 unmodified lines11912012112212312412512612712812914 unmodified linesimport PIL.Imageimport tensorflow as tfORIGINAL_REPO_URL = 'https://github.com/KichangKim/DeepDanbooru'TITLE = 'KichangKim/DeepDanbooru'DESCRIPTION = f'A demo for {ORIGINAL_REPO_URL}'ARTICLE = NoneTOKEN = os.environ['TOKEN']MODEL_REPO = 'hysts/DeepDanbooru'MODEL_FILENAME = 'model-resnet_custom_v3.h5'LABEL_FILENAME = 'tags.txt'81 unmodified linesfunc = functools.partial(predict, model=model, labels=labels)func = functools.update_wrapper(func, predict)gr.Interface(func,[5 unmodified lineslabel='Score Threshold'),],gr.outputs.Label(label='Output'),examples=examples,title=TITLE,description=DESCRIPTION,article=ARTICLE,theme=args.theme,allow_screenshot=args.allow_screenshot,allow_flagging=args.allow_flagging,live=args.live,
app.py+9-10