Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -108,7 +108,7 @@ def plot_dual_axes(
|
|
| 108 |
|
| 109 |
def run_historical_sentiment(ticker):
|
| 110 |
# Explanation of this page
|
| 111 |
-
st.write("**Historical Sentiment**")
|
| 112 |
st.write(
|
| 113 |
"Use this page to see how sentiment changes over time for a specific ticker. "
|
| 114 |
"It retrieves past data on sentiment, posts, comments, likes, and impressions "
|
|
@@ -259,7 +259,7 @@ def plot_trending(df, title, top_n):
|
|
| 259 |
|
| 260 |
def run_trending_sentiment(top_n):
|
| 261 |
# Explanation of this page
|
| 262 |
-
st.write("**Trending Sentiment**")
|
| 263 |
st.write(
|
| 264 |
"Use this page to see which symbols rank highest in bullish or bearish sentiment right now. "
|
| 265 |
"This helps pinpoint active tickers with strong positive or negative views."
|
|
@@ -385,7 +385,7 @@ def run_change_sentiment(top_n):
|
|
| 385 |
|
| 386 |
def main():
|
| 387 |
st.set_page_config(page_title="Social Sentiment Analysis", layout="wide")
|
| 388 |
-
st.title("Trending Social Sentiment")
|
| 389 |
|
| 390 |
# Overall introduction to the app
|
| 391 |
st.write(
|
|
@@ -437,21 +437,21 @@ def main():
|
|
| 437 |
st.session_state.change_top_n = top_n
|
| 438 |
|
| 439 |
if page == "Historical Sentiment":
|
| 440 |
-
|
| 441 |
if st.session_state.historical_run:
|
| 442 |
run_historical_sentiment(st.session_state.historical_ticker)
|
| 443 |
else:
|
| 444 |
st.info("Enter a ticker and click the button.")
|
| 445 |
|
| 446 |
elif page == "Trending Sentiment":
|
| 447 |
-
|
| 448 |
if st.session_state.trending_run:
|
| 449 |
run_trending_sentiment(st.session_state.trending_top_n)
|
| 450 |
else:
|
| 451 |
st.info("Pick a top N and click the button.")
|
| 452 |
|
| 453 |
elif page == "Sentiment Change":
|
| 454 |
-
|
| 455 |
if st.session_state.change_run:
|
| 456 |
run_change_sentiment(st.session_state.change_top_n)
|
| 457 |
else:
|
|
|
|
| 108 |
|
| 109 |
def run_historical_sentiment(ticker):
|
| 110 |
# Explanation of this page
|
| 111 |
+
#st.write("**Historical Sentiment**")
|
| 112 |
st.write(
|
| 113 |
"Use this page to see how sentiment changes over time for a specific ticker. "
|
| 114 |
"It retrieves past data on sentiment, posts, comments, likes, and impressions "
|
|
|
|
| 259 |
|
| 260 |
def run_trending_sentiment(top_n):
|
| 261 |
# Explanation of this page
|
| 262 |
+
#st.write("**Trending Sentiment**")
|
| 263 |
st.write(
|
| 264 |
"Use this page to see which symbols rank highest in bullish or bearish sentiment right now. "
|
| 265 |
"This helps pinpoint active tickers with strong positive or negative views."
|
|
|
|
| 385 |
|
| 386 |
def main():
|
| 387 |
st.set_page_config(page_title="Social Sentiment Analysis", layout="wide")
|
| 388 |
+
#st.title("Trending Social Sentiment")
|
| 389 |
|
| 390 |
# Overall introduction to the app
|
| 391 |
st.write(
|
|
|
|
| 437 |
st.session_state.change_top_n = top_n
|
| 438 |
|
| 439 |
if page == "Historical Sentiment":
|
| 440 |
+
st.header("Historical Social Sentiment")
|
| 441 |
if st.session_state.historical_run:
|
| 442 |
run_historical_sentiment(st.session_state.historical_ticker)
|
| 443 |
else:
|
| 444 |
st.info("Enter a ticker and click the button.")
|
| 445 |
|
| 446 |
elif page == "Trending Sentiment":
|
| 447 |
+
st.header("Trending Social Sentiment")
|
| 448 |
if st.session_state.trending_run:
|
| 449 |
run_trending_sentiment(st.session_state.trending_top_n)
|
| 450 |
else:
|
| 451 |
st.info("Pick a top N and click the button.")
|
| 452 |
|
| 453 |
elif page == "Sentiment Change":
|
| 454 |
+
st.header("Social Sentiment Change")
|
| 455 |
if st.session_state.change_run:
|
| 456 |
run_change_sentiment(st.session_state.change_top_n)
|
| 457 |
else:
|