Uthar commited on
Commit
b03fd10
1 Parent(s): e3a615c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -117,15 +117,6 @@ js="""
117
  <script>console.log("BOOOOOOOOOOOOOOOOBS");</script>
118
  """
119
 
120
- js_upload = """
121
- () => {
122
- const link = document.createElement('a');
123
- link.href = output_data;
124
- link.download = 'uploaded_image.png';
125
- link.click();
126
- }
127
- """
128
-
129
  with gr.Blocks(fill_width=True, head=js) as demo:
130
  with gr.Tab(str(num_models) + ' Models'):
131
  with gr.Column(scale=2):
@@ -151,11 +142,11 @@ with gr.Blocks(fill_width=True, head=js) as demo:
151
  with gr.Row():
152
  output = [gr.Image(label=m, show_download_button=True,
153
  interactive=False, width=112, height=112, show_share_button=False, format="png",
154
- visible=True, js=js_upload) for m in default_models]
155
  current_models = [gr.Textbox(m, visible=False) for m in default_models]
156
 
157
  with gr.Column(scale=2):
158
- gallery = gr.Gallery(label="Output", show_download_button=True, elem_classes="TheGallery",
159
  interactive=False, show_share_button=False, container=True, format="png",
160
  preview=True, object_fit="cover", columns=2, rows=2)
161
 
@@ -195,12 +186,12 @@ with gr.Blocks(fill_width=True, head=js) as demo:
195
  with gr.Column(scale=1):
196
  with gr.Group():
197
  with gr.Row():
198
- output2 = [gr.Image(label='', show_download_button=True, elem_classes="output",
199
  interactive=False, width=112, height=112, visible=True, format="png",
200
  show_share_button=False, show_label=False) for _ in range(max_images)]
201
 
202
  with gr.Column(scale=2):
203
- gallery2 = gr.Gallery(label="Output", show_download_button=True, elem_classes="gallery",
204
  interactive=False, show_share_button=True, container=True, format="png",
205
  preview=True, object_fit="cover", columns=2, rows=2)
206
 
 
117
  <script>console.log("BOOOOOOOOOOOOOOOOBS");</script>
118
  """
119
 
 
 
 
 
 
 
 
 
 
120
  with gr.Blocks(fill_width=True, head=js) as demo:
121
  with gr.Tab(str(num_models) + ' Models'):
122
  with gr.Column(scale=2):
 
142
  with gr.Row():
143
  output = [gr.Image(label=m, show_download_button=True,
144
  interactive=False, width=112, height=112, show_share_button=False, format="png",
145
+ visible=True) for m in default_models]
146
  current_models = [gr.Textbox(m, visible=False) for m in default_models]
147
 
148
  with gr.Column(scale=2):
149
+ gallery = gr.Gallery(label="Output", show_download_button=True,
150
  interactive=False, show_share_button=False, container=True, format="png",
151
  preview=True, object_fit="cover", columns=2, rows=2)
152
 
 
186
  with gr.Column(scale=1):
187
  with gr.Group():
188
  with gr.Row():
189
+ output2 = [gr.Image(label='', show_download_button=True,
190
  interactive=False, width=112, height=112, visible=True, format="png",
191
  show_share_button=False, show_label=False) for _ in range(max_images)]
192
 
193
  with gr.Column(scale=2):
194
+ gallery2 = gr.Gallery(label="Output", show_download_button=True,
195
  interactive=False, show_share_button=True, container=True, format="png",
196
  preview=True, object_fit="cover", columns=2, rows=2)
197