Spaces:
Runtime error
Runtime error
update layout
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def process_response(response_dict):
|
|
22 |
|
23 |
response_dict = get_initial_images()
|
24 |
initial = process_response(response_dict)
|
25 |
-
initial_imgs = '<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-gap: 0;
|
26 |
|
27 |
#Third: Load more images for the grid
|
28 |
def get_next10_images(response_dict, row_count):
|
@@ -38,7 +38,7 @@ def get_next10_images(response_dict, row_count):
|
|
38 |
#print("(2)",type(response))
|
39 |
#print("(3)",type(response['data'][0]))
|
40 |
next_set = [resp[0][:-1] for resp in response_dict["data"]]
|
41 |
-
next_set_images = '<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-gap: 0;
|
42 |
return response['data'][0], row_count, next_set_images
|
43 |
|
44 |
#get_next10_images(response_dict=response_dict, row_count=9)
|
|
|
22 |
|
23 |
response_dict = get_initial_images()
|
24 |
initial = process_response(response_dict)
|
25 |
+
initial_imgs = '<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-gap: 0; background-color: #fff; padding: 20px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);">\n' + "\n".join(initial[:-1])
|
26 |
|
27 |
#Third: Load more images for the grid
|
28 |
def get_next10_images(response_dict, row_count):
|
|
|
38 |
#print("(2)",type(response))
|
39 |
#print("(3)",type(response['data'][0]))
|
40 |
next_set = [resp[0][:-1] for resp in response_dict["data"]]
|
41 |
+
next_set_images = '<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-gap: 0; background-color: #fff; padding: 20px; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); ">\n' + "\n".join(next_set[:-1])
|
42 |
return response['data'][0], row_count, next_set_images
|
43 |
|
44 |
#get_next10_images(response_dict=response_dict, row_count=9)
|