hysts HF Staff commited on
Commit
e3e2c6e
·
1 Parent(s): b19e241
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -23,8 +23,12 @@ sys.path.insert(0, 'bizarre-pose-estimator')
23
 
24
  from _util.twodee_v0 import I as ImageWrapper
25
 
26
- TOKEN = os.environ['TOKEN']
 
 
 
27
 
 
28
  MODEL_REPO = 'hysts/bizarre-pose-estimator-models'
29
  MODEL_FILENAME = 'segmenter.pth'
30
 
@@ -144,11 +148,6 @@ def main():
144
  final_head=final_head)
145
  func = functools.update_wrapper(func, predict)
146
 
147
- repo_url = 'https://github.com/ShuhongChen/bizarre-pose-estimator'
148
- title = 'ShuhongChen/bizarre-pose-estimator (segmenter)'
149
- description = f'A demo for {repo_url}'
150
- article = None
151
-
152
  gr.Interface(
153
  func,
154
  [
@@ -160,11 +159,11 @@ def main():
160
  label='Score Threshold'),
161
  ],
162
  gr.outputs.Image(label='Masked'),
163
- theme=args.theme,
164
- title=title,
165
- description=description,
166
- article=article,
167
  examples=examples,
 
 
 
 
168
  allow_screenshot=args.allow_screenshot,
169
  allow_flagging=args.allow_flagging,
170
  live=args.live,
 
23
 
24
  from _util.twodee_v0 import I as ImageWrapper
25
 
26
+ ORIGINAL_REPO_URL = 'https://github.com/ShuhongChen/bizarre-pose-estimator'
27
+ TITLE = 'ShuhongChen/bizarre-pose-estimator (segmenter)'
28
+ DESCRIPTION = f'A demo for {ORIGINAL_REPO_URL}'
29
+ ARTICLE = None
30
 
31
+ TOKEN = os.environ['TOKEN']
32
  MODEL_REPO = 'hysts/bizarre-pose-estimator-models'
33
  MODEL_FILENAME = 'segmenter.pth'
34
 
 
148
  final_head=final_head)
149
  func = functools.update_wrapper(func, predict)
150
 
 
 
 
 
 
151
  gr.Interface(
152
  func,
153
  [
 
159
  label='Score Threshold'),
160
  ],
161
  gr.outputs.Image(label='Masked'),
 
 
 
 
162
  examples=examples,
163
+ title=TITLE,
164
+ description=DESCRIPTION,
165
+ article=ARTICLE,
166
+ theme=args.theme,
167
  allow_screenshot=args.allow_screenshot,
168
  allow_flagging=args.allow_flagging,
169
  live=args.live,