princeml commited on
Commit
4d2d10a
1 Parent(s): cd52ccc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -117,7 +117,7 @@ def main():
117
  st.header("Image Prediction App")
118
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
119
  if uploaded_file is not None:
120
- with st.util.tempfile.NamedTemporaryFile(suffix=".jpg") as temp:
121
  temp.write(uploaded_file.getvalue())
122
  temp.seek(0)
123
  image = cv2.imread(temp.name)
 
117
  st.header("Image Prediction App")
118
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
119
  if uploaded_file is not None:
120
+ with st.proto.TempFile(suffix=".jpg") as temp:
121
  temp.write(uploaded_file.getvalue())
122
  temp.seek(0)
123
  image = cv2.imread(temp.name)