HAL1993 commited on
Commit
77779dc
·
verified ·
1 Parent(s): 1f59de3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -24
app.py CHANGED
@@ -69,29 +69,34 @@ def evaluate(fg_image: PIL.Image.Image, bg_image: PIL.Image.Image, num_sampling_
69
 
70
  return (np.array(img_pasted), np.array(output_image))
71
 
72
- with gr.Blocks(css="""
73
- body::before {
74
- content: "";
75
- display: block;
76
- height: 320px;
77
- background-color: inherit;
78
- }
79
- button[aria-label="Download"] {
80
- transform: scale(3);
81
- transform-origin: top right;
82
- margin: 0 !important;
83
- padding: 6px !important;
84
- }
85
- button[aria-label="Share"] {
86
- display: none;
87
- }
88
- button[aria-label="Copy link"] {
89
- display: none;
90
- }
91
- button[aria-label="Open in new tab"] {
92
- display: none;
93
- }
94
- """, title="") as demo:
 
 
 
 
 
95
  gr.Markdown("")
96
 
97
  with gr.Row():
@@ -119,4 +124,4 @@ button[aria-label="Open in new tab"] {
119
  bg_gallery.select(bg_gallery_selected, inputs=bg_gallery, outputs=bg_image)
120
 
121
  if __name__ == "__main__":
122
- demo.queue().launch(show_api=False)
 
69
 
70
  return (np.array(img_pasted), np.array(output_image))
71
 
72
+ with gr.Blocks() as app:
73
+ gr.HTML("""
74
+ <style>
75
+ body::before {
76
+ content: "";
77
+ display: block;
78
+ height: 320px;
79
+ background-color: var(--body-background-fill);
80
+ }
81
+ button[aria-label="Fullscreen"], button[aria-label="Fullscreen"]:hover {
82
+ display: none !important;
83
+ visibility: hidden !important;
84
+ opacity: 0 !important;
85
+ pointer-events: none !important;
86
+ }
87
+ button[aria-label="Share"], button[aria-label="Share"]:hover {
88
+ display: none !important;
89
+ }
90
+ button[aria-label="Download"] {
91
+ transform: scale(3);
92
+ transform-origin: top right;
93
+ margin: 0 !important;
94
+ padding: 6px !important;
95
+ }
96
+ </style>
97
+ """)
98
+
99
+ gr.Markdown("")
100
  gr.Markdown("")
101
 
102
  with gr.Row():
 
124
  bg_gallery.select(bg_gallery_selected, inputs=bg_gallery, outputs=bg_image)
125
 
126
  if __name__ == "__main__":
127
+ app.launch(share=True)