radames commited on
Commit
c9f321f
1 Parent(s): edb2c88

fix querySelector

Browse files
Files changed (1) hide show
  1. share_btn.py +1 -2
share_btn.py CHANGED
@@ -39,8 +39,7 @@ share_js = """async () => {
39
  }
40
 
41
 
42
- //const gradioEl = document.querySelector('body > gradio-app');
43
- const gradioEl = document.querySelector("gradio-app").shadowRoot;
44
 
45
  const whisper_input = gradioEl.querySelector('#text_inp textarea').value;
46
  const outputVideo = gradioEl.querySelector('#video_out video');
 
39
  }
40
 
41
 
42
+ const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app');
 
43
 
44
  const whisper_input = gradioEl.querySelector('#text_inp textarea').value;
45
  const outputVideo = gradioEl.querySelector('#video_out video');