import streamlit as st import requests # Set page config with a custom title and layout st.set_page_config( page_title="Steam Property Dashboard", page_icon="🔥", layout="centered" ) # Apply a background GIF def set_bg_gif(url): st.markdown( f""" """, unsafe_allow_html=True ) # Set background GIF (Use a direct link to a hosted GIF) #set_bg_gif("https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExczlwcnY3ZWVndXllMngzNjh6ZTdlcHdzNmgyMWg5YXUzY3VwZmp3NyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/ee934C7BCxPQi5scNl/giphy.gif") # Water to steam GIF # Water to steam GIF # Streamlit UI st.title("🔥 Steam Property Dashboard") st.markdown("Enter the **pressure (bar)** to get steam properties.") # User input for pressure pressure = st.number_input("Enter Pressure (bar):", min_value=0.1, max_value=100.0, step=0.1, value=1.0) # Button to fetch data if st.button("Get Properties"): try: # Call the API (Replace with your actual API URL) api_url = f"https://steam-properties.onrender.com/get_properties" params = {"pressure":pressure} response = requests.get(api_url,params) if response.status_code == 200: data = response.json() # Display results in columns col1, col2 = st.columns(2) with col1: st.markdown(f"