Update app.py
Browse files
app.py
CHANGED
|
@@ -144,7 +144,8 @@ def linscale(linear):
|
|
| 144 |
return int(math.log2(linear))
|
| 145 |
|
| 146 |
def loadf(f):
|
| 147 |
-
f
|
|
|
|
| 148 |
return f
|
| 149 |
|
| 150 |
|
|
@@ -176,7 +177,7 @@ with gr.Blocks() as demo:
|
|
| 176 |
gr.HTML(title)
|
| 177 |
with gr.Row():
|
| 178 |
with gr.Column():
|
| 179 |
-
files_input = gr.File(file_count="
|
| 180 |
gallery_input = gr.Gallery(label="Slides", preview=True, columns=8192, interactive=False)
|
| 181 |
files_input.change(fn=loadf, inputs=[files_input], outputs=[gallery_input])
|
| 182 |
with gr.Row():
|
|
|
|
| 144 |
return int(math.log2(linear))
|
| 145 |
|
| 146 |
def loadf(f):
|
| 147 |
+
if f != None:
|
| 148 |
+
f = f.sort()
|
| 149 |
return f
|
| 150 |
|
| 151 |
|
|
|
|
| 177 |
gr.HTML(title)
|
| 178 |
with gr.Row():
|
| 179 |
with gr.Column():
|
| 180 |
+
files_input = gr.File(file_count="multiple", file_types=['image'])
|
| 181 |
gallery_input = gr.Gallery(label="Slides", preview=True, columns=8192, interactive=False)
|
| 182 |
files_input.change(fn=loadf, inputs=[files_input], outputs=[gallery_input])
|
| 183 |
with gr.Row():
|