fix querySelector (#3)
Browse files- fix querySelector (c9f321f6ab528c6d87fda469037139e74c9492d7)
Co-authored-by: Radamés Ajna <[email protected]>
- share_btn.py +1 -2
share_btn.py
CHANGED
|
@@ -39,8 +39,7 @@ share_js = """async () => {
|
|
| 39 |
}
|
| 40 |
|
| 41 |
|
| 42 |
-
|
| 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');
|