JoanParanoid commited on
Commit
5c6e809
·
verified ·
1 Parent(s): 0deccd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -33,8 +33,12 @@ def analyze_financial_news():
33
  if energy_oil_news:
34
  # If there are news related to "Energy | Oil", perform sentiment analysis for each news
35
  for idx, news in enumerate(energy_oil_news, start=1):
 
36
  st.write(f"News {idx} structure:")
37
  st.write(news)
 
 
 
38
  else:
39
  st.write("No news relevant to Energy | Oil.")
40
 
 
33
  if energy_oil_news:
34
  # If there are news related to "Energy | Oil", perform sentiment analysis for each news
35
  for idx, news in enumerate(energy_oil_news, start=1):
36
+ # Print the structure of each news to find the correct key for the news text
37
  st.write(f"News {idx} structure:")
38
  st.write(news)
39
+
40
+ # Uncomment the following line once you identify the correct key for the news text
41
+ # sentiment_results = sentiment_analysis(news["<correct_key_for_text>"])[0]
42
  else:
43
  st.write("No news relevant to Energy | Oil.")
44