Spaces:
Sleeping
Sleeping
tensorgirl
commited on
Commit
•
488609d
1
Parent(s):
62528eb
Update utils.py
Browse files
utils.py
CHANGED
@@ -80,6 +80,8 @@ def summary(input_json):
|
|
80 |
url = 'https://www.bseindia.com/xml-data/corpfiling/AttachLive/'+ input_json['FileURL'].split('Pname=')[-1]
|
81 |
|
82 |
ouput["Link to BSE website"] = url
|
|
|
|
|
83 |
|
84 |
output["Stock Ticker"] = input_json['symbol']
|
85 |
|
@@ -95,10 +97,10 @@ def summary(input_json):
|
|
95 |
|
96 |
utc_now = datetime.datetime.utcnow()
|
97 |
ist_now = utc_now.astimezone(datetime.timezone(datetime.timedelta(hours=5, minutes=30)))
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
output['Date'] =
|
102 |
|
103 |
prompt = "Answer in one word the sentiment of this News out of Positive, Negative or Neutral {}"
|
104 |
output['Sentiment'] = call(prompt, output['web'])
|
|
|
80 |
url = 'https://www.bseindia.com/xml-data/corpfiling/AttachLive/'+ input_json['FileURL'].split('Pname=')[-1]
|
81 |
|
82 |
ouput["Link to BSE website"] = url
|
83 |
+
|
84 |
+
output["Date of time of receiving data from BSE"] = input_json["newsdate"]
|
85 |
|
86 |
output["Stock Ticker"] = input_json['symbol']
|
87 |
|
|
|
97 |
|
98 |
utc_now = datetime.datetime.utcnow()
|
99 |
ist_now = utc_now.astimezone(datetime.timezone(datetime.timedelta(hours=5, minutes=30)))
|
100 |
+
|
101 |
+
Date = ist_now.strftime("%Y-%m-%d")
|
102 |
+
time = ist_now.strftime("%X")
|
103 |
+
output['Date and time of data delivery from Skylark'] = Date+"T"+time+"Z"
|
104 |
|
105 |
prompt = "Answer in one word the sentiment of this News out of Positive, Negative or Neutral {}"
|
106 |
output['Sentiment'] = call(prompt, output['web'])
|