arithescientist commited on
Commit
acb0d79
·
verified ·
1 Parent(s): a7d0e58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -164,7 +164,16 @@ def insertintotable():
164
  {"Date": r["Date"], "Adj Close": r["ARIMA"]}
165
  for r in forecast
166
  ]
 
 
 
 
 
 
 
167
 
 
 
168
  with open("static/assets/js/trends.json", "w", encoding='utf-8') as f:
169
  simplejson.dump(trends, f, default= str, ignore_nan=True, ensure_ascii=False, indent=4)
170
  with open("static/assets/js/pastpreds.json","w", encoding='utf-8') as f:
 
164
  {"Date": r["Date"], "Adj Close": r["ARIMA"]}
165
  for r in forecast
166
  ]
167
+
168
+ pie = [
169
+ {"sizes": pos, "labels": "Positive"},
170
+ {"sizes": neg, "labels": "Negative"},
171
+ {"sizes": neu, "labels": "Neutral"},
172
+ ]
173
+
174
 
175
+ with open("static/assets/js/pie.json", "w", encoding='utf-8') as f:
176
+ simplejson.dump(pie, f, default= str, ignore_nan=True, ensure_ascii=False, indent=4)
177
  with open("static/assets/js/trends.json", "w", encoding='utf-8') as f:
178
  simplejson.dump(trends, f, default= str, ignore_nan=True, ensure_ascii=False, indent=4)
179
  with open("static/assets/js/pastpreds.json","w", encoding='utf-8') as f: