Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,25 +69,33 @@ def details_fn(query):
|
|
| 69 |
|
| 70 |
<style>
|
| 71 |
.im_container{
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
.im_each{
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
| 78 |
}
|
| 79 |
</style>
|
| 80 |
<div class='im_container'>
|
| 81 |
"""
|
| 82 |
images = soup.findAll('img')
|
| 83 |
for img in images:
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
format_out = f"""{image_out}</div>"""
|
| 92 |
except Exeption as e:
|
| 93 |
format_out = "None"
|
|
|
|
| 69 |
|
| 70 |
<style>
|
| 71 |
.im_container{
|
| 72 |
+
background: white;
|
| 73 |
+
width: 100%;
|
| 74 |
+
display: flex;
|
| 75 |
+
flex-direction: row;
|
| 76 |
+
flex-wrap: wrap;
|
| 77 |
+
justify-content: space-evenly;
|
| 78 |
+
align-items: center;
|
| 79 |
+
align-content: center;
|
| 80 |
}
|
| 81 |
.im_each{
|
| 82 |
+
background: blue;
|
| 83 |
+
width: 20%;
|
| 84 |
+
border-style: dashed;
|
| 85 |
+
border-width: medium;
|
| 86 |
}
|
| 87 |
</style>
|
| 88 |
<div class='im_container'>
|
| 89 |
"""
|
| 90 |
images = soup.findAll('img')
|
| 91 |
for img in images:
|
| 92 |
+
if not img.startswith("data:"):
|
| 93 |
+
image_out += f"""
|
| 94 |
+
<div class='im_each'>
|
| 95 |
+
<img src={img['src']}>
|
| 96 |
+
</div>
|
| 97 |
+
"""
|
| 98 |
+
print (img['src'])
|
| 99 |
format_out = f"""{image_out}</div>"""
|
| 100 |
except Exeption as e:
|
| 101 |
format_out = "None"
|