Dmitry Beresnev commited on
Commit
71f44e2
Β·
1 Parent(s): 8c30daa

fix file uploading

Browse files
Files changed (2) hide show
  1. app.py +4 -4
  2. requirements.txt +1 -1
app.py CHANGED
@@ -77,7 +77,7 @@ with col1:
77
  if uploaded_file:
78
  # Display uploaded image
79
  image = Image.open(uploaded_file)
80
- st.image(image, caption="Uploaded Portfolio Screenshot", use_container_width=True)
81
 
82
  # OCR processing
83
  with st.spinner("Extracting text from image..."):
@@ -187,15 +187,15 @@ if st.session_state.portfolio_validated and st.session_state.portfolio_data:
187
 
188
  # Historical Prices
189
  st.subheader("πŸ“ˆ Historical Prices (Last 5 Days)")
190
- st.dataframe(metrics['prices'].tail(), use_container_width=True)
191
 
192
  # Returns
193
  with st.expander("πŸ“‰ Daily Log Returns (Last 5 Days)"):
194
- st.dataframe(metrics['returns'].tail(), use_container_width=True)
195
 
196
  # Covariance Matrix
197
  st.subheader("πŸ”’ Covariance Matrix (Annualized)")
198
- st.dataframe(metrics['cov_matrix'] * 252, use_container_width=True)
199
 
200
  st.divider()
201
 
 
77
  if uploaded_file:
78
  # Display uploaded image
79
  image = Image.open(uploaded_file)
80
+ st.image(image, caption="Uploaded Portfolio Screenshot", use_column_width=True)
81
 
82
  # OCR processing
83
  with st.spinner("Extracting text from image..."):
 
187
 
188
  # Historical Prices
189
  st.subheader("πŸ“ˆ Historical Prices (Last 5 Days)")
190
+ st.dataframe(metrics['prices'].tail(), use_column_width=True)
191
 
192
  # Returns
193
  with st.expander("πŸ“‰ Daily Log Returns (Last 5 Days)"):
194
+ st.dataframe(metrics['returns'].tail(), use_column_width=True)
195
 
196
  # Covariance Matrix
197
  st.subheader("πŸ”’ Covariance Matrix (Annualized)")
198
+ st.dataframe(metrics['cov_matrix'] * 252, use_column_width=True)
199
 
200
  st.divider()
201
 
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- streamlit==1.32.0
2
  pytesseract==0.3.10
3
  Pillow==10.2.0
4
  yfinance==0.2.36
 
1
+ streamlit==1.31.0
2
  pytesseract==0.3.10
3
  Pillow==10.2.0
4
  yfinance==0.2.36