Spaces:
Running
Running
admin
commited on
Commit
·
ca4fff8
1
Parent(s):
fee8cc1
sync ms
Browse files- app.py +4 -7
- requirements.txt +3 -1
app.py
CHANGED
|
@@ -13,7 +13,7 @@ ZH2EN = {
|
|
| 13 |
"导出原格式": "Export original format",
|
| 14 |
"下载清理 EXIF 后的图片": "Download cleaned picture",
|
| 15 |
"批量处理": "Batch processor",
|
| 16 |
-
"
|
| 17 |
"导出原格式": "Export original format",
|
| 18 |
"下载清理 EXIF 后的多图片压缩包": "Download cleaned pictures",
|
| 19 |
"EXIF 列表": "EXIF list",
|
|
@@ -100,8 +100,7 @@ def batch_infer(imgs_zip: str, keep_ext: bool, cache=f"{TMP_DIR}/exif"):
|
|
| 100 |
exifs = []
|
| 101 |
for img in imgs:
|
| 102 |
clear_exif(img, cache, img_mode, "outputs/")
|
| 103 |
-
exifs.append(
|
| 104 |
-
{"filename": os.path.basename(img), "exif": get_exif(img)})
|
| 105 |
|
| 106 |
if not exifs:
|
| 107 |
raise ValueError("No picture in the zip")
|
|
@@ -149,10 +148,8 @@ if __name__ == "__main__":
|
|
| 149 |
fn=batch_infer,
|
| 150 |
inputs=[
|
| 151 |
gr.File(
|
| 152 |
-
label=_L(
|
| 153 |
-
|
| 154 |
-
),
|
| 155 |
-
file_types=[".zip"],
|
| 156 |
),
|
| 157 |
gr.Checkbox(
|
| 158 |
label=_L("导出原格式"),
|
|
|
|
| 13 |
"导出原格式": "Export original format",
|
| 14 |
"下载清理 EXIF 后的图片": "Download cleaned picture",
|
| 15 |
"批量处理": "Batch processor",
|
| 16 |
+
"上传包含多图片的压缩包 (请确保上传完全后再提交)": "Upload pictures zip (please ensure the zip is completely uploaded before clicking submit)",
|
| 17 |
"导出原格式": "Export original format",
|
| 18 |
"下载清理 EXIF 后的多图片压缩包": "Download cleaned pictures",
|
| 19 |
"EXIF 列表": "EXIF list",
|
|
|
|
| 100 |
exifs = []
|
| 101 |
for img in imgs:
|
| 102 |
clear_exif(img, cache, img_mode, "outputs/")
|
| 103 |
+
exifs.append({"filename": os.path.basename(img), "exif": get_exif(img)})
|
|
|
|
| 104 |
|
| 105 |
if not exifs:
|
| 106 |
raise ValueError("No picture in the zip")
|
|
|
|
| 148 |
fn=batch_infer,
|
| 149 |
inputs=[
|
| 150 |
gr.File(
|
| 151 |
+
label=_L("上传包含多图片的压缩包 (请确保上传完全后再提交)"),
|
| 152 |
+
file_types=[".zip", ".7z", ".rar"],
|
|
|
|
|
|
|
| 153 |
),
|
| 154 |
gr.Checkbox(
|
| 155 |
label=_L("导出原格式"),
|
requirements.txt
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
exifread
|
|
|
|
|
|
|
|
|
| 1 |
+
exifread
|
| 2 |
+
py7zr
|
| 3 |
+
rarfile
|