Spaces:
Running
Running
Update
Browse files14 unmodified lines1516171818192021222324252681 unmodified lines1081091101071081091101111111121135 unmodified lines11912012112312412512612212312412512612712812914 unmodified linesimport PIL.Imageimport tensorflow as tf
TOKEN = os.environ['TOKEN']ORIGINAL_REPO_URL = 'https://github.com/KichangKim/DeepDanbooru'TITLE = 'KichangKim/DeepDanbooru'DESCRIPTION = f'A demo for {ORIGINAL_REPO_URL}'ARTICLE = None
TOKEN = os.environ['TOKEN']MODEL_REPO = 'hysts/DeepDanbooru'MODEL_FILENAME = 'model-resnet_custom_v3.h5'LABEL_FILENAME = 'tags.txt'81 unmodified lines func = 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 = None
gr.Interface( func, [5 unmodified lines label='Score Threshold'), ], gr.outputs.Label(label='Output'), theme=args.theme, title=title, description=description, article=article, 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