Spaces:
Sleeping
Sleeping
Upload app.py
Browse filesui to google files also
app.py
CHANGED
|
@@ -28,7 +28,6 @@ tab1, tab2 = st.tabs(["Upload Image", "Tree Image URLs"])
|
|
| 28 |
|
| 29 |
# Upload Image Tab
|
| 30 |
with tab1:
|
| 31 |
-
# Upload image and make prediction
|
| 32 |
uploaded_image = st.file_uploader("Upload an image of a tree", type=["jpg", "jpeg", "png"])
|
| 33 |
|
| 34 |
if uploaded_image:
|
|
@@ -41,17 +40,114 @@ with tab1:
|
|
| 41 |
|
| 42 |
# Tree Image URLs Tab
|
| 43 |
with tab2:
|
| 44 |
-
#
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# Upload Image Tab
|
| 30 |
with tab1:
|
|
|
|
| 31 |
uploaded_image = st.file_uploader("Upload an image of a tree", type=["jpg", "jpeg", "png"])
|
| 32 |
|
| 33 |
if uploaded_image:
|
|
|
|
| 40 |
|
| 41 |
# Tree Image URLs Tab
|
| 42 |
with tab2:
|
| 43 |
+
# Google Drive image links for decorated trees
|
| 44 |
+
decorated_tree_links = [
|
| 45 |
+
'https://drive.google.com/uc?id=1s1Uqj_s96plRhtCGNjg_kHkDbWYmCRMY',
|
| 46 |
+
'https://drive.google.com/uc?id=1zZGYO0kquchCx7jOcPftSYZylkHfQ0gu',
|
| 47 |
+
'https://drive.google.com/uc?id=1pm2j79VgJ0JkVZOnRJb6mQFzEL9TxjTo',
|
| 48 |
+
'https://drive.google.com/uc?id=1tUwv_G4mF6dvhqk1jaDF1cZlo1R8MMwB',
|
| 49 |
+
'https://drive.google.com/uc?id=1qpc_7kwgh09npTJeQznlGGKN2qjflgA8',
|
| 50 |
+
'https://drive.google.com/uc?id=1zPu9jDSzHGPtEFf5v2NJ5LzyFJx_p03x',
|
| 51 |
+
'https://drive.google.com/uc?id=1-NQ7Xu9LWb7i4lzH_qX68NkLuCl-UqPm',
|
| 52 |
+
'https://drive.google.com/uc?id=17Sm9O_taK7qW30GAAH7KDhRd_lpkkQ9t',
|
| 53 |
+
'https://drive.google.com/uc?id=1h8SDOH6QlEpllkwrSfvx3GOjQoH5oqsa',
|
| 54 |
+
'https://drive.google.com/uc?id=1nW9swiSi4auIN8UHY3lx5OjsXAkdrzum',
|
| 55 |
+
'https://drive.google.com/uc?id=1I8Ah4pzNTaXZ99o_ieEk8Bw4J2hUNtWp',
|
| 56 |
+
'https://drive.google.com/uc?id=15Rw0lDKc4yDDF6xlvaqoJCw4doga6oJf',
|
| 57 |
+
'https://drive.google.com/uc?id=1a2wZP_rptmxUHDtjlRJn9ldAmBlylKBE',
|
| 58 |
+
'https://drive.google.com/uc?id=1FyOYqjAyxnxLNWZCgrs20gwGIHdHJwsR',
|
| 59 |
+
'https://drive.google.com/uc?id=15jsNKDv8cC8bzJRpbtpmZZtX4eE2BsQX',
|
| 60 |
+
'https://drive.google.com/uc?id=18gmTdaoxV99LwavDYXkK0rMXYzvce62t',
|
| 61 |
+
'https://drive.google.com/uc?id=1id6Dv9E_In3NYNBRHGN8DK9m6M52M0mU',
|
| 62 |
+
'https://drive.google.com/uc?id=12rhbUDxufsouaASgcSSGhB9BgW138id2',
|
| 63 |
+
'https://drive.google.com/uc?id=1WFaME9kdmJ-xxkysAs2T9iu2qh1TehBF',
|
| 64 |
+
'https://drive.google.com/uc?id=1u3ufd0eR3_l6UbmscstoYQyhWG0MEWYm',
|
| 65 |
+
'https://drive.google.com/uc?id=1LMX0JURbsJw1WlNW0ZdAK39qbSkcps2k',
|
| 66 |
+
'https://drive.google.com/uc?id=10lyMEz2soI-71F_DhxT_3Xq-nCxLn3zr',
|
| 67 |
+
'https://drive.google.com/uc?id=1L8Hp8bfyQPvU-z6Lr6OHLu8-JlEPVvf1',
|
| 68 |
+
'https://drive.google.com/uc?id=1-U2s5HMl7IruRpjhDNl36ULCQf4cbv7A',
|
| 69 |
+
'https://drive.google.com/uc?id=1DLDlFUwzKDZh1oSueq0LabLcehpZ1Agi',
|
| 70 |
+
'https://drive.google.com/uc?id=1xrcmWQx03yWOkVskKIuom1BnKDfPONWK',
|
| 71 |
+
'https://drive.google.com/uc?id=1csc4yjYPC3qzaRc1rIJ4qYV6oPcLpUKV',
|
| 72 |
+
'https://drive.google.com/uc?id=17Cvej9iQ4tUlcXJW7IKQwyWOmslFr96x',
|
| 73 |
+
'https://drive.google.com/uc?id=1jXy_nRvjwuLRTOUWr1affg0F-CZOhiAT',
|
| 74 |
+
'https://drive.google.com/uc?id=1blLRdb6rElcBiIuMfh4zu1UlmhcF1euS',
|
| 75 |
+
'https://drive.google.com/uc?id=1Njf-kcs0AmK-htLgVmZClmtwtISzyFIu',
|
| 76 |
+
'https://drive.google.com/uc?id=1vfpkxLl3u745NJEVeG_5_48FaNxTgnZy',
|
| 77 |
+
'https://drive.google.com/uc?id=1N6YQ33X1d5V50uHBcOAuE4-dOlTTh_ox',
|
| 78 |
+
'https://drive.google.com/uc?id=1EKPhMFEcUSUb4wsjfJZXMlg1F3v3iOE2',
|
| 79 |
+
'https://drive.google.com/uc?id=1oxvxSf3OrG2M4OuSTf83WhvhyLvNZgw2',
|
| 80 |
+
'https://drive.google.com/uc?id=1MYHfRbWlNQxJmH-gst6vI25wJQBCNfji',
|
| 81 |
+
'https://drive.google.com/uc?id=1SmUPpmCGY46UoUyF5iZhUf7xfqkBhHP7',
|
| 82 |
+
'https://drive.google.com/uc?id=1PjRtvuDgtgym2MX8tSAeMueFFxuSQr5B',
|
| 83 |
+
'https://drive.google.com/uc?id=10CiI7WBqfVw3W7JJIgKbclCQGniR8Mty',
|
| 84 |
+
'https://drive.google.com/uc?id=1NuqBzpFB30fzm_XwUX2q4ZWOMADGB27I',
|
| 85 |
+
'https://drive.google.com/uc?id=13PZNT2gFSKy-kRzLGc24P35HZxy1bOEk',
|
| 86 |
+
'https://drive.google.com/uc?id=1Ro-aomaLsWolrytswSK4w-i7HDeMq0Ly',
|
| 87 |
+
'https://drive.google.com/uc?id=1qCH_SGmAU6ZsSwzBfEIVNj0CBSD-W1N5',
|
| 88 |
+
'https://drive.google.com/uc?id=1JckwP7ufoseHrDQQKR0B8laZceDBUgTA',
|
| 89 |
+
'https://drive.google.com/uc?id=1OXhxFme6j6mNS9fEKXM-vgOTsKDTpNBk'
|
| 90 |
+
]
|
| 91 |
+
|
| 92 |
+
# Google Drive image links for undecorated trees
|
| 93 |
+
undecorated_tree_links = [
|
| 94 |
+
'https://drive.google.com/uc?id=1CJGozNQTAK5qdmzRtfxB-W2ZInL4ngHT',
|
| 95 |
+
'https://drive.google.com/uc?id=16vJ5COb8A30e081RqM0x55uAA2CHAxdn',
|
| 96 |
+
'https://drive.google.com/uc?id=1WvGMzEyJEk2eZIvAoW4widAemStAPT78',
|
| 97 |
+
'https://drive.google.com/uc?id=1D_ms-S2jiEe9QQ_fyW_D9veU7-7DD3oG',
|
| 98 |
+
'https://drive.google.com/uc?id=1Jj7hf7B_AiSc4ziXJ0-oQA7Z68ai9lUI',
|
| 99 |
+
'https://drive.google.com/uc?id=1_pWGCpSAwAcDuoOezYoWz_mynzH6eZHs',
|
| 100 |
+
'https://drive.google.com/uc?id=1J7me4MF2hm2SnxnyBbBihGELei2q-m3q',
|
| 101 |
+
'https://drive.google.com/uc?id=1o-k9Qe8agu5_iag4Ly4cswjsgHjWDbpL',
|
| 102 |
+
'https://drive.google.com/uc?id=1xhxQFHHW6qE4FIwjgjUYeojx2bZWBah-',
|
| 103 |
+
'https://drive.google.com/uc?id=1be86YTPUC4na9olywAZGa8GzmlRGf2t2',
|
| 104 |
+
'https://drive.google.com/uc?id=1zdFEzWx6iYfIwlCAimhkgC6Xiy92SEsZ',
|
| 105 |
+
'https://drive.google.com/uc?id=1ezA_O2hVg8htfpRknzv6XqFEQxZyAxjq',
|
| 106 |
+
'https://drive.google.com/uc?id=1shf4hvN0mgvUtqN_h_wbrF6Xcx5M8URm',
|
| 107 |
+
'https://drive.google.com/uc?id=1J0ZVZ8P5tHhFwVXxz4VeN0s5h6_UyxIC',
|
| 108 |
+
'https://drive.google.com/uc?id=1zdxUq5CKfuqgD8dQd6gsSkxzOIXREp58',
|
| 109 |
+
'https://drive.google.com/uc?id=1x3QqENsd92iXgO2H_w0Jwhsw9j1VdbqB',
|
| 110 |
+
'https://drive.google.com/uc?id=1D0w7AY5lfr8j5jglrR6rFEAYbq9kVdzO',
|
| 111 |
+
'https://drive.google.com/uc?id=1jwMb5fwIm05m6b66o8lbkXatmpI0wFZb',
|
| 112 |
+
'https://drive.google.com/uc?id=1MI7pNC-77g5WmQI6FJxh-wu3M61gcbRz',
|
| 113 |
+
'https://drive.google.com/uc?id=1HJ7xw5gHdnfHK5J8H_bGHGn_1fF_axtZ',
|
| 114 |
+
'https://drive.google.com/uc?id=1u0_AwLmqcPYpyS2eJtnI1cS3yBi7JJZ9',
|
| 115 |
+
'https://drive.google.com/uc?id=1sJlqHoAANhMiiQKjXYRdyWY96A5-Rhyx',
|
| 116 |
+
'https://drive.google.com/uc?id=1GgrBRVtLUN0d51gaxA9B6YPz8bJ2n6OA',
|
| 117 |
+
'https://drive.google.com/uc?id=1F5wWvh5tiT0d35B_fCmOerSTsXNdp2s6',
|
| 118 |
+
'https://drive.google.com/uc?id=1Ow6G5yM5O0NSvDHTihwUgdHgCqXz5H4c',
|
| 119 |
+
'https://drive.google.com/uc?id=1gfI3wdTcnF5Fw_vR2Jqzm5woqOw1W96I',
|
| 120 |
+
'https://drive.google.com/uc?id=1bHkjP5XpfpO9aHwvU1RuJ4xOkrhU2ntM',
|
| 121 |
+
'https://drive.google.com/uc?id=1iKr5AhhFjm9A4u9EOiX9LwPxz8uwFgsf',
|
| 122 |
+
'https://drive.google.com/uc?id=1cG3XgIH0YY_eMne1pM3GB6j9ROZoXM1A',
|
| 123 |
+
'https://drive.google.com/uc?id=1vk7ad4HFN4iH6qPgnFT8-f_7eWdu5Zxb',
|
| 124 |
+
'https://drive.google.com/uc?id=1cM4owT8VRrjmtGRfyxgrHRuxW2pnITgJ',
|
| 125 |
+
'https://drive.google.com/uc?id=1o2yOGKCV2wD9Th9TXZyIu7o3_61G2T0Z',
|
| 126 |
+
'https://drive.google.com/uc?id=1XVsLlfo7vIhCXYlQs-VHrzjOq9dNT1rh',
|
| 127 |
+
'https://drive.google.com/uc?id=1XMZqYtq1FdZb52ECykFkPVyQ8ZYoA1hv',
|
| 128 |
+
'https://drive.google.com/uc?id=1JqkcwklzxtkMn3Ox0gMoxFgMd5XYH2hv',
|
| 129 |
+
'https://drive.google.com/uc?id=1l8hgIFo8OjqTn1J0w4Y8z_H30QzkDdKN'
|
| 130 |
+
]
|
| 131 |
+
|
| 132 |
+
with tab2:
|
| 133 |
+
st.subheader("Decorated Trees")
|
| 134 |
+
for link in decorated_tree_links:
|
| 135 |
+
st.image(link, use_column_width=True)
|
| 136 |
+
|
| 137 |
+
st.subheader("Undecorated Trees")
|
| 138 |
+
for link in undecorated_tree_links:
|
| 139 |
+
st.image(link, use_column_width=True)
|
| 140 |
+
|
| 141 |
+
# Display the links below the images
|
| 142 |
+
st.write("Below are the available links to test with your model:")
|
| 143 |
+
|
| 144 |
+
st.subheader("Decorated Trees")
|
| 145 |
+
for link in decorated_tree_links:
|
| 146 |
+
st.write(link)
|
| 147 |
+
|
| 148 |
+
st.subheader("Undecorated Trees")
|
| 149 |
+
for link in undecorated_tree_links:
|
| 150 |
+
st.write(link)
|
| 151 |
+
|
| 152 |
+
# Add download link for images if needed
|
| 153 |
+
st.markdown("[Download the image list](https://raw.githubusercontent.com/willco-afk/tree-samples/main/tree_images.txt)")
|