Update
Browse files
app.py
CHANGED
|
@@ -19,8 +19,12 @@ sys.path.insert(0, 'bizarre-pose-estimator')
|
|
| 19 |
|
| 20 |
from _util.twodee_v0 import I as ImageWrapper
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
|
|
|
|
| 24 |
MODEL_REPO = 'hysts/bizarre-pose-estimator-models'
|
| 25 |
MODEL_FILENAME = 'tagger.pth'
|
| 26 |
LABEL_FILENAME = 'tags.txt'
|
|
@@ -116,11 +120,6 @@ def main():
|
|
| 116 |
labels=labels)
|
| 117 |
func = functools.update_wrapper(func, predict)
|
| 118 |
|
| 119 |
-
repo_url = 'https://github.com/ShuhongChen/bizarre-pose-estimator'
|
| 120 |
-
title = 'ShuhongChen/bizarre-pose-estimator (tagger)'
|
| 121 |
-
description = f'A demo for {repo_url}'
|
| 122 |
-
article = None
|
| 123 |
-
|
| 124 |
gr.Interface(
|
| 125 |
func,
|
| 126 |
[
|
|
@@ -132,11 +131,11 @@ def main():
|
|
| 132 |
label='Score Threshold'),
|
| 133 |
],
|
| 134 |
gr.outputs.Label(label='Output'),
|
| 135 |
-
theme=args.theme,
|
| 136 |
-
title=title,
|
| 137 |
-
description=description,
|
| 138 |
-
article=article,
|
| 139 |
examples=examples,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
allow_screenshot=args.allow_screenshot,
|
| 141 |
allow_flagging=args.allow_flagging,
|
| 142 |
live=args.live,
|
|
|
|
| 19 |
|
| 20 |
from _util.twodee_v0 import I as ImageWrapper
|
| 21 |
|
| 22 |
+
ORIGINAL_REPO_URL = 'https://github.com/ShuhongChen/bizarre-pose-estimator'
|
| 23 |
+
TITLE = 'ShuhongChen/bizarre-pose-estimator (tagger)'
|
| 24 |
+
DESCRIPTION = f'A demo for {ORIGINAL_REPO_URL}'
|
| 25 |
+
ARTICLE = None
|
| 26 |
|
| 27 |
+
TOKEN = os.environ['TOKEN']
|
| 28 |
MODEL_REPO = 'hysts/bizarre-pose-estimator-models'
|
| 29 |
MODEL_FILENAME = 'tagger.pth'
|
| 30 |
LABEL_FILENAME = 'tags.txt'
|
|
|
|
| 120 |
labels=labels)
|
| 121 |
func = functools.update_wrapper(func, predict)
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
gr.Interface(
|
| 124 |
func,
|
| 125 |
[
|
|
|
|
| 131 |
label='Score Threshold'),
|
| 132 |
],
|
| 133 |
gr.outputs.Label(label='Output'),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
examples=examples,
|
| 135 |
+
title=TITLE,
|
| 136 |
+
description=DESCRIPTION,
|
| 137 |
+
article=ARTICLE,
|
| 138 |
+
theme=args.theme,
|
| 139 |
allow_screenshot=args.allow_screenshot,
|
| 140 |
allow_flagging=args.allow_flagging,
|
| 141 |
live=args.live,
|