moldenhof commited on
Commit
03c79df
1 Parent(s): 14892ee

implementing app

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -37,12 +37,15 @@ model_atom.model.roi_heads.score_thresh = 0.65
37
 
38
  st.title("Atom Level Entity Detector")
39
 
40
- file_name = st.file_uploader("Upload a chemical structure candidate image")
41
- st.write('filename is', file_name)
42
- if file_name is not None:
43
  col1, col2 = st.columns(2)
44
 
45
- image = Image.open(file_name)
46
  col1.image(image, use_column_width=True)
 
 
 
47
  x = st.slider('Select a value')
48
  st.write(x, 'squared is', x * x)
 
37
 
38
  st.title("Atom Level Entity Detector")
39
 
40
+ image_file = st.file_uploader("Upload a chemical structure candidate image",type=['png','jpeg','jpg'])
41
+ #st.write('filename is', file_name)
42
+ if image_file is not None:
43
  col1, col2 = st.columns(2)
44
 
45
+ image = Image.open(image_file)
46
  col1.image(image, use_column_width=True)
47
+ with open(os.path.join("uploads",image_file.name),"wb") as f:
48
+ f.write(image_file.getbuffer())
49
+ st.success("Saved File")
50
  x = st.slider('Select a value')
51
  st.write(x, 'squared is', x * x)