Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,12 @@ def main():
|
|
10 |
|
11 |
with st.form("text_field"):
|
12 |
uploaded_file = st.file_uploader("Upload Files",type=['png','jpeg','jpg'])
|
13 |
-
|
14 |
-
|
|
|
|
|
15 |
if uploaded_file!=None:
|
16 |
-
|
17 |
img=Image.open(uploaded_file)
|
18 |
|
19 |
extractor = AutoFeatureExtractor.from_pretrained("yangy50/garbage-classification")
|
@@ -40,6 +42,7 @@ def main():
|
|
40 |
st.write("trash")
|
41 |
|
42 |
st.image(img)
|
|
|
43 |
|
44 |
if __name__ == "__main__":
|
45 |
main()
|
|
|
10 |
|
11 |
with st.form("text_field"):
|
12 |
uploaded_file = st.file_uploader("Upload Files",type=['png','jpeg','jpg'])
|
13 |
+
clicked = st.form_submit_button("Submit")
|
14 |
+
if clicked:
|
15 |
+
uploaded_file = st.file_uploader("Upload Files",type=['png','jpeg','jpg'])
|
16 |
+
|
17 |
if uploaded_file!=None:
|
18 |
+
|
19 |
img=Image.open(uploaded_file)
|
20 |
|
21 |
extractor = AutoFeatureExtractor.from_pretrained("yangy50/garbage-classification")
|
|
|
42 |
st.write("trash")
|
43 |
|
44 |
st.image(img)
|
45 |
+
|
46 |
|
47 |
if __name__ == "__main__":
|
48 |
main()
|