Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import requests | |
| st.title("SuperKart Frontend Test") | |
| st.write("This is a minimal test to ensure the frontend loads correctly on Hugging Face.") | |
| # Single input field for testing | |
| prod_weight = st.number_input("Product Weight (kg)", min_value=0.0, max_value=200.0, value=12.0) | |
| # Button to simulate single prediction call | |
| if st.button("Test API Call"): | |
| st.write(f"You entered: {prod_weight} kg") | |
| # Optional: call backend API (replace URL with your backend Space) | |
| # input_data = {'Product_Weight': prod_weight} | |
| # response = requests.post("https://<username>-<backend>.hf.space/v1/SuperKartSales", json=input_data) | |
| # st.write(response.text) | |