hysts commited on
Commit
f77ad3f
1 Parent(s): 5c0e5ea
Files changed (2) hide show
  1. app.py +9 -7
  2. style.css +4 -0
app.py CHANGED
@@ -16,6 +16,13 @@ if os.getenv('SYSTEM') == 'spaces':
16
 
17
  from model import Model
18
 
 
 
 
 
 
 
 
19
 
20
  def parse_args() -> argparse.Namespace:
21
  parser = argparse.ArgumentParser()
@@ -42,11 +49,8 @@ def main():
42
  model = Model(args.device)
43
 
44
  with gr.Blocks(theme=args.theme, css='style.css') as demo:
45
- gr.Markdown('''<h1 id="title">Text2Human</h1>
46
 
47
- This is an unofficial demo for <a href="https://github.com/yumingj/Text2Human">https://github.com/yumingj/Text2Human</a>.
48
- You can modify sample steps and seeds. By varying seeds, you can sample different human images under the same pose, shape description, and texture description. The larger the sample steps, the better quality of the generated images. (The default value of sample steps is 256 in the original repo.)</a>
49
- ''')
50
  with gr.Row():
51
  with gr.Column():
52
  with gr.Row():
@@ -105,9 +109,7 @@ Note: Currently, only 5 types of textures are supported, i.e., pure color, strip
105
  with gr.Row():
106
  generate_human_button = gr.Button('Generate Human')
107
 
108
- gr.Markdown(
109
- '<center><img src="https://visitor-badge.glitch.me/badge?page_id=hysts.text2human" alt="visitor badge"/></center>'
110
- )
111
 
112
  input_image.change(fn=model.process_pose_image,
113
  inputs=[input_image],
16
 
17
  from model import Model
18
 
19
+ DESCRIPTION = '''# Text2Human
20
+
21
+ This is an unofficial demo for <a href="https://github.com/yumingj/Text2Human">https://github.com/yumingj/Text2Human</a>.
22
+ You can modify sample steps and seeds. By varying seeds, you can sample different human images under the same pose, shape description, and texture description. The larger the sample steps, the better quality of the generated images. (The default value of sample steps is 256 in the original repo.)
23
+ '''
24
+ FOOTER = '<img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=hysts.text2human" />'
25
+
26
 
27
  def parse_args() -> argparse.Namespace:
28
  parser = argparse.ArgumentParser()
49
  model = Model(args.device)
50
 
51
  with gr.Blocks(theme=args.theme, css='style.css') as demo:
52
+ gr.Markdown(DESCRIPTION)
53
 
 
 
 
54
  with gr.Row():
55
  with gr.Column():
56
  with gr.Row():
109
  with gr.Row():
110
  generate_human_button = gr.Button('Generate Human')
111
 
112
+ gr.Markdown(FOOTER)
 
 
113
 
114
  input_image.change(fn=model.process_pose_image,
115
  inputs=[input_image],
style.css CHANGED
@@ -10,3 +10,7 @@ h1 {
10
  #result-image {
11
  height: 300px;
12
  }
 
 
 
 
10
  #result-image {
11
  height: 300px;
12
  }
13
+ img#visitor-badge {
14
+ display: block;
15
+ margin: auto;
16
+ }