Spaces:
Sleeping
Sleeping
File size: 837 Bytes
d1f7784 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import streamlit as st
import model_main
def main():
st.title("Sharingan")
st.sidebar.image("eye.png", width=100)
st.sidebar.title("Sharingan")
st.sidebar.write("Sharingan is an Image Descriptor")
st.sidebar.write("Upload an image and see it's description below")
uploaded_file = st.sidebar.file_uploader("Choose an image", type=["jpg", "jpeg", "png"])
if uploaded_file is not None:
st.image(uploaded_file, caption="using sharingan...", use_column_width=True)
st.text("Generated Description:")
st.title(model_main.generate_caption(uploaded_file))
else:
st.image("violin.jpg", caption="using sharingan...", use_column_width=True)
st.text("Generated Description:")
st.title(model_main.generate_caption("violin.jpg"))
if __name__ == "__main__":
main()
|