Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,9 @@ from PIL import Image
|
|
| 6 |
from modelscope import snapshot_download
|
| 7 |
from insectid import InsectDetector, InsectIdentifier
|
| 8 |
|
| 9 |
-
MODEL_DIR = snapshot_download(
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
def infer(filename: str):
|
|
@@ -82,7 +84,7 @@ if __name__ == "__main__":
|
|
| 82 |
f"{MODEL_DIR}/examples/butterfly.jpg",
|
| 83 |
f"{MODEL_DIR}/examples/beetle.jpg",
|
| 84 |
],
|
| 85 |
-
|
| 86 |
cache_examples=False,
|
| 87 |
)
|
| 88 |
|
|
@@ -93,4 +95,3 @@ if __name__ == "__main__":
|
|
| 93 |
)
|
| 94 |
|
| 95 |
demo.launch()
|
| 96 |
-
|
|
|
|
| 6 |
from modelscope import snapshot_download
|
| 7 |
from insectid import InsectDetector, InsectIdentifier
|
| 8 |
|
| 9 |
+
MODEL_DIR = snapshot_download(
|
| 10 |
+
"Genius-Society/insecta", cache_dir="./insectid/__pycache__"
|
| 11 |
+
)
|
| 12 |
|
| 13 |
|
| 14 |
def infer(filename: str):
|
|
|
|
| 84 |
f"{MODEL_DIR}/examples/butterfly.jpg",
|
| 85 |
f"{MODEL_DIR}/examples/beetle.jpg",
|
| 86 |
],
|
| 87 |
+
flagging_mode="never",
|
| 88 |
cache_examples=False,
|
| 89 |
)
|
| 90 |
|
|
|
|
| 95 |
)
|
| 96 |
|
| 97 |
demo.launch()
|
|
|