Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ def divisible_by_8(image):
|
|
35 |
|
36 |
@spaces.GPU()
|
37 |
def restore_version(index, versions):
|
|
|
38 |
final_dict = {'background': versions[index][0], 'layers': None, 'composite': versions[index][0]}
|
39 |
return final_dict
|
40 |
|
@@ -105,7 +106,7 @@ with gr.Blocks() as demo:
|
|
105 |
with gr.Column():
|
106 |
version_gallery = gr.Gallery(label="Versions", type="pil", object_fit='contain', visible=False)
|
107 |
restore_button = gr.Button("Restore Version", visible=False)
|
108 |
-
selected = gr.Number(show_label=False, visible=
|
109 |
|
110 |
|
111 |
version_gallery.select(get_select_index, None, selected)
|
|
|
35 |
|
36 |
@spaces.GPU()
|
37 |
def restore_version(index, versions):
|
38 |
+
print('restore version:', index)
|
39 |
final_dict = {'background': versions[index][0], 'layers': None, 'composite': versions[index][0]}
|
40 |
return final_dict
|
41 |
|
|
|
106 |
with gr.Column():
|
107 |
version_gallery = gr.Gallery(label="Versions", type="pil", object_fit='contain', visible=False)
|
108 |
restore_button = gr.Button("Restore Version", visible=False)
|
109 |
+
selected = gr.Number(show_label=False, visible=True)
|
110 |
|
111 |
|
112 |
version_gallery.select(get_select_index, None, selected)
|