implementing app
Browse files
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 |
-
|
| 41 |
-
st.write('filename is', file_name)
|
| 42 |
-
if
|
| 43 |
col1, col2 = st.columns(2)
|
| 44 |
|
| 45 |
-
image = Image.open(
|
| 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)
|