yizhangliu commited on
Commit
a370c7b
1 Parent(s): 089d495

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -282,7 +282,7 @@ start_cleaner = """async() => {
282
  data_image.setAttribute('style', 'height: ' + max_height + 'px');
283
  data_image_div.setAttribute('style', 'min-height: ' + max_height + 'px');
284
  }
285
- if (window.location.href.indexOf('https://huggingface.co/spaces') == -1) {
286
  const share_btn_container = gradioEl.querySelectorAll('#share-btn-container')[0];
287
  share_btn_container.setAttribute('style', 'width: 0px; height:0px;');
288
  const share_btn_share_icon = gradioEl.querySelectorAll('#share-btn-share-icon')[0];
 
282
  data_image.setAttribute('style', 'height: ' + max_height + 'px');
283
  data_image_div.setAttribute('style', 'min-height: ' + max_height + 'px');
284
  }
285
+ if (!(gradioEl.parentNode)) {
286
  const share_btn_container = gradioEl.querySelectorAll('#share-btn-container')[0];
287
  share_btn_container.setAttribute('style', 'width: 0px; height:0px;');
288
  const share_btn_share_icon = gradioEl.querySelectorAll('#share-btn-share-icon')[0];