jayebaku commited on
Commit
b4e1b98
·
verified ·
1 Parent(s): 5fdbd4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -385,7 +385,9 @@ with gr.Blocks(fill_width=True) as demo:
385
  m_js = """ (x) =>
386
  {
387
  reloadTwitterWidgets();
388
- twttr.widgets.createTweet(x,document.getElementById('tweet-container'),{theme: 'dark'});
 
 
389
  }
390
 
391
  """
 
385
  m_js = """ (x) =>
386
  {
387
  reloadTwitterWidgets();
388
+ const tweetContainer = document.getElementById("tweet-container");
389
+ tweetContainer.innerHTML = "";
390
+ twttr.widgets.createTweet(x,tweetContainer,{theme: 'dark'});
391
  }
392
 
393
  """