carpeadiam commited on
Commit
9ac3f6c
·
verified ·
1 Parent(s): e464787

Update StockSentimentNews.py

Browse files
Files changed (1) hide show
  1. StockSentimentNews.py +4 -0
StockSentimentNews.py CHANGED
@@ -134,10 +134,14 @@ def sentiment_analysis(querystring, headers):
134
  print(f"Positive/Negative Ratio: {output['sentiment_metrics']['sentiment_ratio']:.2f}")
135
  print(f"Average Confidence: {output['sentiment_metrics']['average_confidence']:.1f}%")
136
 
 
 
137
  import json
138
  with open("sentiment_results.json", "w") as f:
139
  json.dump(output, f, indent=2)
140
  print("Results saved to sentiment_results.json")
 
 
141
  return output
142
 
143
  def mainOne(querystring):
 
134
  print(f"Positive/Negative Ratio: {output['sentiment_metrics']['sentiment_ratio']:.2f}")
135
  print(f"Average Confidence: {output['sentiment_metrics']['average_confidence']:.1f}%")
136
 
137
+
138
+ """
139
  import json
140
  with open("sentiment_results.json", "w") as f:
141
  json.dump(output, f, indent=2)
142
  print("Results saved to sentiment_results.json")
143
+ """
144
+
145
  return output
146
 
147
  def mainOne(querystring):