bipin commited on
Commit
06bd2af
·
1 Parent(s): 318e93d

added caching

Browse files
Files changed (1) hide show
  1. utils.py +1 -0
utils.py CHANGED
@@ -3,6 +3,7 @@ import streamlit as st
3
  import streamlit.components.v1 as components
4
 
5
 
 
6
  def get_tweet(url):
7
  api = f"https://publish.twitter.com/oembed?url={url}&maxwidth=400&theme=dark"
8
  content = requests.get(api).json()
 
3
  import streamlit.components.v1 as components
4
 
5
 
6
+ @st.cache
7
  def get_tweet(url):
8
  api = f"https://publish.twitter.com/oembed?url={url}&maxwidth=400&theme=dark"
9
  content = requests.get(api).json()