Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -593,7 +593,13 @@ with final_recs:
|
|
| 593 |
recs['Date'] = recs['Date'].dt.date
|
| 594 |
rec_dates = np.sort(list(recs['Date'].unique()))
|
| 595 |
pred_date = st.selectbox("Pick the Test Date", rec_dates)
|
| 596 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 597 |
# date_value = pd.to_datetime('2021-08-12')
|
| 598 |
# pred_date = st.date_input("Pick Test Date", value=date_value, min_value=date_value, max_value=date_limit)
|
| 599 |
role = st.radio(
|
|
@@ -627,7 +633,10 @@ with final_recs:
|
|
| 627 |
# st.subheader("GenAI Recommendations")
|
| 628 |
trade_recs.reset_index(inplace=True, drop=True)
|
| 629 |
genrec_container = st.container(border=False)
|
| 630 |
-
genrec_container.
|
|
|
|
|
|
|
|
|
|
| 631 |
|
| 632 |
# genrec = 'Recommendation for following day will go here.'
|
| 633 |
genrec_container.write(trade_recs['Recommendations'][0])
|
|
|
|
| 593 |
recs['Date'] = recs['Date'].dt.date
|
| 594 |
rec_dates = np.sort(list(recs['Date'].unique()))
|
| 595 |
pred_date = st.selectbox("Pick the Test Date", rec_dates)
|
| 596 |
+
fp = {}
|
| 597 |
+
for index, d in enumerate(rec_dates[:-1]):
|
| 598 |
+
fr = recs[recs['Date'] == rec_dates[index+1]]
|
| 599 |
+
following_price = fr['Price'][0]
|
| 600 |
+
fp[d] = following_price
|
| 601 |
+
|
| 602 |
+
fp[rec_dates[-1]] = 'Not Available'
|
| 603 |
# date_value = pd.to_datetime('2021-08-12')
|
| 604 |
# pred_date = st.date_input("Pick Test Date", value=date_value, min_value=date_value, max_value=date_limit)
|
| 605 |
role = st.radio(
|
|
|
|
| 633 |
# st.subheader("GenAI Recommendations")
|
| 634 |
trade_recs.reset_index(inplace=True, drop=True)
|
| 635 |
genrec_container = st.container(border=False)
|
| 636 |
+
rec_col1, rec_col2, rec_col3 = genrec_container.columns(3, gap='medium')
|
| 637 |
+
rec_col1.write(f'<span style="font-size: large;"><b>Current Date:</b> <u>{pred_date}</u></span>', unsafe_allow_html=True)
|
| 638 |
+
rec_col2.write(f'<span style="font-size: large;"><b>Current Close Price:</b> {trade_recs['Price'][0]}</span>', unsafe_allow_html=True)
|
| 639 |
+
rec_col3.write(f'<span style="font-size: large;"><b>Following Close Price:</b> {fp[pred_date]}</span>', unsafe_allow_html=True)
|
| 640 |
|
| 641 |
# genrec = 'Recommendation for following day will go here.'
|
| 642 |
genrec_container.write(trade_recs['Recommendations'][0])
|