Spaces:
Build error
Build error
File size: 1,251 Bytes
e67b575 ba12792 6903ffe ba12792 6903ffe ba12792 6903ffe ba12792 6903ffe ba12792 6903ffe ba12792 6903ffe ba12792 6903ffe ba12792 |
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 26 27 28 29 30 31 32 33 34 |
import streamlit as st
from PIL import Image
import io
st.title("Artisan Product Submission Form")
uploaded_file = st.file_uploader("Choose a file", type=["png", "jpg", "jpeg"])
if uploaded_file is not None:
# To read file as bytes:
bytes_data = uploaded_file.getvalue()
st.write("Filename: ", uploaded_file.name)
# st.write(bytes_data) # This will display the raw bytes, typically not useful for users
# To display the image
image = Image.open(io.BytesIO(bytes_data))
st.image(image, caption='Uploaded Image.', use_column_width=True)
# Creating text input box
st.header("Tell us about your product")
# Input fields
product_type = st.text_input("Type of Product", placeholder="e.g., Handmade Jewelry, Pottery, Painting")
product_origin = st.text_input("Product Origin", placeholder="e.g., City, Country, Region")
product_description = st.text_area("Brief Description", placeholder="Provide a brief description of your product")
# Submit button
if st.button("Submit"):
st.write("Thank you for your submission!")
st.write("### Product Details")
st.write(f"**Type of Product:** {product_type}")
st.write(f"**Product Origin:** {product_origin}")
st.write(f"**Description:** {product_description}") |