Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,6 @@
|
|
1 |
import os
|
2 |
os.environ["GRADIO_SSR_MODE"] = "false"
|
3 |
|
4 |
-
if not os.path.exists("checkpoints"):
|
5 |
-
os.makedirs("checkpoints")
|
6 |
-
os.system("pip install gdown")
|
7 |
-
os.system("gdown https://drive.google.com/uc?id=1eQe6blJcyI7oy78C8ozwj1IUkbkFEItf; unzip -o dam_3b_v1.zip -d checkpoints")
|
8 |
-
|
9 |
from segment_anything import sam_model_registry, SamPredictor
|
10 |
import gradio as gr
|
11 |
import numpy as np
|
@@ -96,7 +91,7 @@ def describe_without_streaming(image_base64: str, mask_base64: str, query: str):
|
|
96 |
|
97 |
if __name__ == "__main__":
|
98 |
parser = argparse.ArgumentParser(description="Describe Anything gradio demo")
|
99 |
-
parser.add_argument("--model-path", type=str, default="
|
100 |
parser.add_argument("--prompt-mode", type=str, default="full+focal_crop", help="Prompt mode")
|
101 |
parser.add_argument("--conv-mode", type=str, default="v1", help="Conversation mode")
|
102 |
parser.add_argument("--temperature", type=float, default=0.2, help="Sampling temperature")
|
|
|
1 |
import os
|
2 |
os.environ["GRADIO_SSR_MODE"] = "false"
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
from segment_anything import sam_model_registry, SamPredictor
|
5 |
import gradio as gr
|
6 |
import numpy as np
|
|
|
91 |
|
92 |
if __name__ == "__main__":
|
93 |
parser = argparse.ArgumentParser(description="Describe Anything gradio demo")
|
94 |
+
parser.add_argument("--model-path", type=str, default="nvidia/DAM-3B", help="Path to the model checkpoint")
|
95 |
parser.add_argument("--prompt-mode", type=str, default="full+focal_crop", help="Prompt mode")
|
96 |
parser.add_argument("--conv-mode", type=str, default="v1", help="Conversation mode")
|
97 |
parser.add_argument("--temperature", type=float, default=0.2, help="Sampling temperature")
|