wg25r
commited on
Commit
·
4917c61
1
Parent(s):
8f8ddfc
- app.py +2 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -6,10 +6,10 @@ st.title("Image Average Pixel Calculator")
|
|
6 |
uploaded_file = st.file_uploader("Upload an image", type=["png", "jpg", "jpeg"])
|
7 |
if uploaded_file:
|
8 |
image = Image.open(uploaded_file)
|
9 |
-
st.image(image, caption="
|
10 |
image_np = np.array(image)
|
11 |
if image_np.ndim == 3:
|
12 |
avg_pixel = image_np.mean(axis=(0, 1))
|
13 |
else:
|
14 |
avg_pixel = image_np.mean()
|
15 |
-
st.
|
|
|
6 |
uploaded_file = st.file_uploader("Upload an image", type=["png", "jpg", "jpeg"])
|
7 |
if uploaded_file:
|
8 |
image = Image.open(uploaded_file)
|
9 |
+
st.image(image, caption="Your Image", use_container_width=True)
|
10 |
image_np = np.array(image)
|
11 |
if image_np.ndim == 3:
|
12 |
avg_pixel = image_np.mean(axis=(0, 1))
|
13 |
else:
|
14 |
avg_pixel = image_np.mean()
|
15 |
+
st.markdown("check out this [link](https://pubchem.ncbi.nlm.nih.gov/#query=%s)" % "CC=CC")
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pubchempy
|