added caching
Browse files
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()
|