File size: 610 Bytes
83eddfc 5a74efa 83eddfc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import streamlit as st
from backend import load_random_object, capture_views # Import the backend functions
# Title and instructions
st.title("3D Object Viewer")
st.write("Click the button below to view a random object's front, top, bottom, and side views.")
# Button to generate views
if st.button("Generate Views"):
st.write("Loading a random object...")
obj = load_random_object()
st.write("Generating views...")
views = capture_views(obj)
# Display views
for view_name, img in views.items():
st.subheader(f"{view_name.capitalize()} View")
st.image(img)
|