admin commited on
Commit
155887e
·
1 Parent(s): cbcd909
Files changed (2) hide show
  1. app.py +13 -16
  2. 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
- with gr.Blocks() as demo:
87
- gr.Interface(
88
- fn=infer,
89
- inputs=gr.Image(type="filepath", label=_L("上传细胞图像")),
90
- outputs=[
91
- gr.Textbox(label=_L("状态栏"), show_copy_button=True),
92
- gr.Textbox(label=_L("图片名"), show_copy_button=True),
93
- gr.Textbox(label=_L("识别结果"), show_copy_button=True),
94
- ],
95
- title=_L("请上传 PNG 格式的 HEp2 细胞图片"),
96
- examples=example_imgs,
97
- flagging_mode="never",
98
- cache_examples=False,
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
- requests
 
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