File size: 596 Bytes
38171fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os
import streamlit as st
import pandas as pd
import requests

API_URL = f"{os.environ['SERVER_URL']}/api/mutual-fund-details/"
response = requests.get(API_URL)

if response.status_code != 200:
    st.error("Error fetching data from the server.")
    st.stop()

df = pd.DataFrame(response.json()["data"])

# Streamlit app
st.set_page_config(layout="wide")

st.markdown(
    "<h1 style='text-align: center;'>Mutual Fund Data Analysis Tool</h1>",
    unsafe_allow_html=True,
)

# Display the DataFrame without scrolling and use the full page width
st.dataframe(df, width=10000, height=1000)