Spaces:
Sleeping
Sleeping
Romain Graux commited on
Remove port
Browse files
app.py
CHANGED
|
@@ -64,8 +64,8 @@ def batch_fn(
|
|
| 64 |
block_state = {}
|
| 65 |
if not files:
|
| 66 |
raise gr.Error("No files were uploaded")
|
| 67 |
-
|
| 68 |
-
if any(not file.name.lower().endswith((
|
| 69 |
raise gr.Error("Only TIFF images are supported")
|
| 70 |
|
| 71 |
gallery = []
|
|
@@ -79,7 +79,6 @@ def batch_fn(
|
|
| 79 |
base_progress + (1 / len(files)) * value,
|
| 80 |
desc=f"Processing image {file_idx+1}/{len(files)}{' - ' + text if text else '...'}",
|
| 81 |
)
|
| 82 |
-
|
| 83 |
|
| 84 |
display_progress(0.1, "Extracting metadata...")
|
| 85 |
physical_metadata = None
|
|
@@ -431,6 +430,4 @@ with gr.Blocks(
|
|
| 431 |
)
|
| 432 |
|
| 433 |
if __name__ == "__main__":
|
| 434 |
-
block.launch(
|
| 435 |
-
server_port=5001,
|
| 436 |
-
)
|
|
|
|
| 64 |
block_state = {}
|
| 65 |
if not files:
|
| 66 |
raise gr.Error("No files were uploaded")
|
| 67 |
+
|
| 68 |
+
if any(not file.name.lower().endswith((".tif", ".tiff")) for file in files):
|
| 69 |
raise gr.Error("Only TIFF images are supported")
|
| 70 |
|
| 71 |
gallery = []
|
|
|
|
| 79 |
base_progress + (1 / len(files)) * value,
|
| 80 |
desc=f"Processing image {file_idx+1}/{len(files)}{' - ' + text if text else '...'}",
|
| 81 |
)
|
|
|
|
| 82 |
|
| 83 |
display_progress(0.1, "Extracting metadata...")
|
| 84 |
physical_metadata = None
|
|
|
|
| 430 |
)
|
| 431 |
|
| 432 |
if __name__ == "__main__":
|
| 433 |
+
block.launch()
|
|
|
|
|
|