Spaces:
Runtime error
Runtime error
ChrisMofus
commited on
Commit
•
4473c1b
1
Parent(s):
b3dfb2c
Add image uploader
Browse files
app.py
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from PIL import Image
|
3 |
|
4 |
+
uploaded_file = st.file_uploader("Choose an image...", type="jpg")
|
5 |
+
|
6 |
+
if uploaded_file is not None:
|
7 |
+
image = Image.open(uploaded_file)
|
8 |
+
st.image(image, caption='Uploaded Image.', use_column_width=True)
|