Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
1377bb8
1
Parent(s):
e11f74d
app.py
CHANGED
@@ -38,25 +38,27 @@ if sample_button:
|
|
38 |
col1.image(img, use_column_width=True)
|
39 |
caps = list(range(10))
|
40 |
col2.image(images, width=175, caption=caps)
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
elements
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
38 |
col1.image(img, use_column_width=True)
|
39 |
caps = list(range(10))
|
40 |
col2.image(images, width=175, caption=caps)
|
41 |
+
|
42 |
+
else:
|
43 |
+
|
44 |
+
|
45 |
+
index= int(col1.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
|
46 |
+
components.html(
|
47 |
+
"""
|
48 |
+
<script>
|
49 |
+
const elements = window.parent.document.querySelectorAll('.stNumberInput div[data-baseweb="input"] > div')
|
50 |
+
console.log(elements)
|
51 |
+
elements[1].style.backgroundColor = 'red'
|
52 |
+
</script>
|
53 |
+
""",
|
54 |
+
height=0,
|
55 |
+
width=0,
|
56 |
+
)
|
57 |
+
|
58 |
+
|
59 |
+
img = images[index]
|
60 |
+
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=10,fill='blue')
|
61 |
+
|
62 |
+
col1.image(img, use_column_width=True)
|
63 |
+
caps = list(range(10))
|
64 |
+
col2.image(images, width=175, caption=caps)
|