Skip to content

Commit

Permalink
hide self-ad when running as webui extension (modelscope#405)
Browse files Browse the repository at this point in the history
Co-authored-by: w-e-w <[email protected]>
  • Loading branch information
wenmengzhou and w-e-w authored Nov 4, 2023
1 parent ef3d9ca commit 47a7e50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,12 @@ def inference_tryon():
base_model['style_list'] = style_in_base

with gr.Blocks(css='style.css') as demo:
gr.Markdown("# <center> \N{fire} FaceChain Potrait Generation ([Github star it here](https://github.com/modelscope/facechain/tree/main) \N{whale}, [Paper cite it here](https://arxiv.org/abs/2308.14256) \N{whale})</center>")
from importlib.util import find_spec
if find_spec('webui'):
# if running as a webui extension, don't display banner self-advertisement
gr.Markdown("# <center> \N{fire} FaceChain Potrait Generation (\N{whale} [Paper cite it here](https://arxiv.org/abs/2308.14256) \N{whale})</center>")
else:
gr.Markdown("# <center> \N{fire} FaceChain Potrait Generation ([Github star it here](https://github.com/modelscope/facechain/tree/main) \N{whale}, [Paper cite it here](https://arxiv.org/abs/2308.14256) \N{whale})</center>")
gr.Markdown("##### <center> 本项目仅供学习交流,请勿将模型及其制作内容用于非法活动或违反他人隐私的场景。(This project is intended solely for the purpose of technological discussion, and should not be used for illegal activities and violating privacy of individuals.)</center>")
with gr.Tabs():
with gr.TabItem('\N{rocket}人物形象训练(Train Digital Twin)'):
Expand Down

0 comments on commit 47a7e50

Please sign in to comment.