Spaces:
Runtime error
Runtime error
Download app.py from vaidik0508/mars-orbitaldata-classification: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/vaidik0508/mars-orbitaldata-classification/resolve/main/app.py
- Command line
-
hf download hf://spaces/vaidik0508/mars-orbitaldata-classification/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vaidik0508/mars-orbitaldata-classification/resolve/main/app.py
540 Bytes
| import streamlit as st | |
| from PIL import Image | |
| from util import get_pred | |
| st.title("Mars Orbital Image (HiRISE) Classification") | |
| st.header("Upload Test Image : ") | |
| uploaded_file = st.file_uploader("Choose a Image ...", type="jpg") | |
| if uploaded_file is not None: | |
| image = Image.open(uploaded_file).convert('RGB') | |
| st.image(image, caption='Uploaded Image.', use_column_width=True) | |
| st.write("") | |
| st.write("Classifying...") | |
| label, conf = get_pred( | |
| image) | |
| st.write(f"Image is '{label}' with {conf} % confidence.") | |