Spaces:
Running
Running
admin
commited on
Commit
·
155887e
1
Parent(s):
cbcd909
sync ms
Browse files- app.py +13 -16
- requirements.txt +2 -2
app.py
CHANGED
|
@@ -83,19 +83,16 @@ if __name__ == "__main__":
|
|
| 83 |
for cls in CLASSES:
|
| 84 |
example_imgs.append(f"{MODEL_DIR}/examples/{cls}.png")
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
)
|
| 100 |
-
|
| 101 |
-
demo.launch()
|
|
|
|
| 83 |
for cls in CLASSES:
|
| 84 |
example_imgs.append(f"{MODEL_DIR}/examples/{cls}.png")
|
| 85 |
|
| 86 |
+
gr.Interface(
|
| 87 |
+
fn=infer,
|
| 88 |
+
inputs=gr.Image(type="filepath", label=_L("上传细胞图像")),
|
| 89 |
+
outputs=[
|
| 90 |
+
gr.Textbox(label=_L("状态栏"), show_copy_button=True),
|
| 91 |
+
gr.Textbox(label=_L("图片名"), show_copy_button=True),
|
| 92 |
+
gr.Textbox(label=_L("识别结果"), show_copy_button=True),
|
| 93 |
+
],
|
| 94 |
+
title=_L("请上传 PNG 格式的 HEp2 细胞图片"),
|
| 95 |
+
examples=example_imgs,
|
| 96 |
+
flagging_mode="never",
|
| 97 |
+
cache_examples=False,
|
| 98 |
+
).launch(ssr_mode=False)
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
torchvision
|
| 3 |
-
torch==2.3.1
|
| 4 |
modelscope[framework]==1.24.0
|
|
|
|
| 1 |
+
torch==2.6.0+cu118
|
| 2 |
+
-f https://download.pytorch.org/whl/torch
|
| 3 |
torchvision
|
|
|
|
| 4 |
modelscope[framework]==1.24.0
|