jhj0517 commited on
Commit
f878f1b
1 Parent(s): b345336

Add header & css constants

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. modules/utils/constants.py +13 -0
app.py CHANGED
@@ -5,13 +5,14 @@ from gradio_i18n import Translate, gettext as _
5
  from modules.live_portrait.live_portrait_inferencer import LivePortraitInferencer
6
  from modules.utils.paths import *
7
  from modules.utils.helper import str2bool
 
8
 
9
 
10
  class App:
11
  def __init__(self,
12
  args=None):
13
  self.args = args
14
- self.app = gr.Blocks()
15
  self.i18n = Translate(I18N_YAML_PATH)
16
  self.inferencer = LivePortraitInferencer()
17
 
@@ -40,6 +41,8 @@ class App:
40
  def launch(self):
41
  with self.app:
42
  with self.i18n:
 
 
43
  with gr.Row():
44
  with gr.Column():
45
  img_ref = gr.Image(label=_("Reference Image"))
 
5
  from modules.live_portrait.live_portrait_inferencer import LivePortraitInferencer
6
  from modules.utils.paths import *
7
  from modules.utils.helper import str2bool
8
+ from modules.utils.constants import *
9
 
10
 
11
  class App:
12
  def __init__(self,
13
  args=None):
14
  self.args = args
15
+ self.app = gr.Blocks(css=GRADIO_CSS)
16
  self.i18n = Translate(I18N_YAML_PATH)
17
  self.inferencer = LivePortraitInferencer()
18
 
 
41
  def launch(self):
42
  with self.app:
43
  with self.i18n:
44
+ gr.Markdown(REPO_MARKDOWN, elem_id="md_project")
45
+
46
  with gr.Row():
47
  with gr.Column():
48
  img_ref = gr.Image(label=_("Reference Image"))
modules/utils/constants.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ REPO_MARKDOWN = """
2
+ ## [AdvancedLivePortrait-WebUI](https://github.com/jhj0517/AdvancedLivePortrait-WebUI/tree/master)
3
+ """
4
+
5
+ GRADIO_CSS = """
6
+ #md_project a {
7
+ color: black;
8
+ text-decoration: none;
9
+ }
10
+ #md_project a:hover {
11
+ text-decoration: underline;
12
+ }
13
+ """