CoolFace
Apppublic

mlnsio/text2sql

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes
ui.py25 linesDownload Raw Back to root
1import os2import streamlit as st3import pandas as pd4import requests5 6API_URL = f"{os.environ['SERVER_URL']}/api/mutual-fund-details/"7response = requests.get(API_URL)8 9if response.status_code != 200:10    st.error("Error fetching data from the server.")11    st.stop()12 13df = pd.DataFrame(response.json()["data"])14 15# Streamlit app16st.set_page_config(layout="wide")17 18st.markdown(19    "<h1 style='text-align: center;'>Mutual Fund Data Analysis Tool</h1>",20    unsafe_allow_html=True,21)22 23# Display the DataFrame without scrolling and use the full page width24st.dataframe(df, width=10000, height=1000)25