Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def get_aggregation_period(df):
|
|
60 |
return "30D"
|
61 |
|
62 |
|
63 |
-
@st.
|
64 |
def load_model():
|
65 |
pipe = pipeline(task="sentiment-analysis", model="bhadresh-savani/distilbert-base-uncased-emotion")
|
66 |
return pipe
|
@@ -72,7 +72,7 @@ def load_model():
|
|
72 |
|
73 |
|
74 |
pipe = load_model()
|
75 |
-
twitter_handle = st.sidebar.text_input("Twitter handle:", "
|
76 |
twitter_count = st.sidebar.selectbox("Number of tweets:", (10, 100, 500, 1000, 3200))
|
77 |
|
78 |
|
|
|
60 |
return "30D"
|
61 |
|
62 |
|
63 |
+
@st.cache_data(allow_output_mutation=True)
|
64 |
def load_model():
|
65 |
pipe = pipeline(task="sentiment-analysis", model="bhadresh-savani/distilbert-base-uncased-emotion")
|
66 |
return pipe
|
|
|
72 |
|
73 |
|
74 |
pipe = load_model()
|
75 |
+
twitter_handle = st.sidebar.text_input("Twitter handle:", "elonmusk")
|
76 |
twitter_count = st.sidebar.selectbox("Number of tweets:", (10, 100, 500, 1000, 3200))
|
77 |
|
78 |
|