Spaces:
Runtime error
Runtime error
Updating some names
Browse files
app.py
CHANGED
|
@@ -95,7 +95,7 @@ def describe_without_streaming(image_base64: str, mask_base64: str, query: str):
|
|
| 95 |
return description
|
| 96 |
|
| 97 |
if __name__ == "__main__":
|
| 98 |
-
parser = argparse.ArgumentParser(description="Describe Anything gradio demo")
|
| 99 |
parser.add_argument("--model-path", type=str, default="checkpoints/dam_3b_v1", help="Path to the model checkpoint")
|
| 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")
|
|
@@ -117,12 +117,12 @@ if __name__ == "__main__":
|
|
| 117 |
).to(device)
|
| 118 |
|
| 119 |
# Create Gradio interface
|
| 120 |
-
with gr.Blocks() as demo:
|
| 121 |
gr.Interface(
|
| 122 |
fn=image_to_sam_embedding,
|
| 123 |
inputs=gr.Textbox(label="Image Base64"),
|
| 124 |
outputs=gr.Textbox(label="Embedding Base64"),
|
| 125 |
-
title="Image Embedding Generator",
|
| 126 |
api_name="image_to_sam_embedding"
|
| 127 |
)
|
| 128 |
gr.Interface(
|
|
@@ -135,7 +135,7 @@ if __name__ == "__main__":
|
|
| 135 |
outputs=[
|
| 136 |
gr.Text(label="Description")
|
| 137 |
],
|
| 138 |
-
title="Mask Description Generator",
|
| 139 |
api_name="describe"
|
| 140 |
)
|
| 141 |
gr.Interface(
|
|
@@ -148,7 +148,7 @@ if __name__ == "__main__":
|
|
| 148 |
outputs=[
|
| 149 |
gr.Text(label="Description")
|
| 150 |
],
|
| 151 |
-
title="Mask Description Generator (Non-Streaming)",
|
| 152 |
api_name="describe_without_streaming"
|
| 153 |
)
|
| 154 |
|
|
|
|
| 95 |
return description
|
| 96 |
|
| 97 |
if __name__ == "__main__":
|
| 98 |
+
parser = argparse.ArgumentParser(description="Dupe Describe Anything gradio demo")
|
| 99 |
parser.add_argument("--model-path", type=str, default="checkpoints/dam_3b_v1", help="Path to the model checkpoint")
|
| 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")
|
|
|
|
| 117 |
).to(device)
|
| 118 |
|
| 119 |
# Create Gradio interface
|
| 120 |
+
with gr.Blocks(title="Dupe Describe Anything") as demo:
|
| 121 |
gr.Interface(
|
| 122 |
fn=image_to_sam_embedding,
|
| 123 |
inputs=gr.Textbox(label="Image Base64"),
|
| 124 |
outputs=gr.Textbox(label="Embedding Base64"),
|
| 125 |
+
title="Dupe Describe Anything - Image Embedding Generator",
|
| 126 |
api_name="image_to_sam_embedding"
|
| 127 |
)
|
| 128 |
gr.Interface(
|
|
|
|
| 135 |
outputs=[
|
| 136 |
gr.Text(label="Description")
|
| 137 |
],
|
| 138 |
+
title="Dupe Describe Anything - Mask Description Generator",
|
| 139 |
api_name="describe"
|
| 140 |
)
|
| 141 |
gr.Interface(
|
|
|
|
| 148 |
outputs=[
|
| 149 |
gr.Text(label="Description")
|
| 150 |
],
|
| 151 |
+
title="Dupe Describe Anything - Mask Description Generator (Non-Streaming)",
|
| 152 |
api_name="describe_without_streaming"
|
| 153 |
)
|
| 154 |
|