Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -176,6 +176,14 @@ with gr.Blocks(fill_width=True) as demo:
|
|
176 |
|
177 |
// Define a global function to reload Twitter widgets
|
178 |
globalThis.reloadTwitterWidgets = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
if (window.twttr && twttr.widgets) {
|
180 |
twttr.widgets.load();
|
181 |
}
|
|
|
176 |
|
177 |
// Define a global function to reload Twitter widgets
|
178 |
globalThis.reloadTwitterWidgets = () => {
|
179 |
+
// Select the container where tweets are inserted
|
180 |
+
const tweetContainer = document.getElementById("tweet-container");
|
181 |
+
|
182 |
+
if (tweetContainer) {
|
183 |
+
tweetContainer.innerHTML = ""; // Clear previous tweets
|
184 |
+
}
|
185 |
+
|
186 |
+
// Reload Twitter widgets
|
187 |
if (window.twttr && twttr.widgets) {
|
188 |
twttr.widgets.load();
|
189 |
}
|