Spaces:
Build error
Build error
second update app.py
Browse files
app.py
CHANGED
@@ -21,15 +21,6 @@ def parse_args() -> argparse.Namespace:
|
|
21 |
|
22 |
is_shared_ui = True if "AIFILMS/StyleGANEX" in os.environ['SPACE_ID'] else False
|
23 |
|
24 |
-
if(is_shared_ui):
|
25 |
-
with gr.Box():
|
26 |
-
top_description = gr.HTML(f'''
|
27 |
-
<div class="gr-prose" style="max-width: 80%">
|
28 |
-
<h2 style="margin-top: 0">Attention - This Space doesn't work in this shared UI</h2>
|
29 |
-
<p>For it to work, you can access the <a href="https://huggingface.co/spaces/PKUWilliamYang/StyleGANEX">original</a> or duplicate this Space and run it on your own profile using a GPU. <a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
|
30 |
-
</div>
|
31 |
-
''')
|
32 |
-
|
33 |
DESCRIPTION = '''
|
34 |
<div align=center>
|
35 |
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
@@ -91,6 +82,14 @@ def main():
|
|
91 |
|
92 |
|
93 |
with gr.Blocks(css='style.css') as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
gr.Markdown(DESCRIPTION)
|
95 |
with gr.Tabs():
|
96 |
with gr.TabItem('Inversion for Editing'):
|
|
|
21 |
|
22 |
is_shared_ui = True if "AIFILMS/StyleGANEX" in os.environ['SPACE_ID'] else False
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
DESCRIPTION = '''
|
25 |
<div align=center>
|
26 |
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
|
|
82 |
|
83 |
|
84 |
with gr.Blocks(css='style.css') as demo:
|
85 |
+
if(is_shared_ui):
|
86 |
+
with gr.Box():
|
87 |
+
top_description = gr.HTML(f'''
|
88 |
+
<div class="gr-prose" style="max-width: 80%">
|
89 |
+
<h2 style="margin-top: 0">Attention - This Space doesn't work in this shared UI</h2>
|
90 |
+
<p>For it to work, you can access the <a href="https://huggingface.co/spaces/PKUWilliamYang/StyleGANEX">original</a> or duplicate this Space and run it on your own profile using a GPU. <a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
|
91 |
+
</div>
|
92 |
+
''')
|
93 |
gr.Markdown(DESCRIPTION)
|
94 |
with gr.Tabs():
|
95 |
with gr.TabItem('Inversion for Editing'):
|