Spaces:
Runtime error
Runtime error
Update App.Py
Browse files
app.py
CHANGED
@@ -9,12 +9,9 @@ import cv2
|
|
9 |
from autodistill.core.custom_detection_model import CustomDetectionModel
|
10 |
|
11 |
MARKDOWN = """
|
12 |
-
#
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
Visit [awesome-openai-vision-api-experiments](https://github.com/roboflow/awesome-openai-vision-api-experiments)
|
17 |
-
repository to find more OpenAI Vision API experiments or contribute your own."""
|
18 |
|
19 |
def respond(api_key, input_image, dino_prompt, gpt_prompt):
|
20 |
input_image = cv2.cvtColor(input_image, cv2.COLOR_BGR2RGB)
|
@@ -47,11 +44,11 @@ with gr.Blocks() as demo:
|
|
47 |
with gr.Column():
|
48 |
api_key_textbox = gr.Textbox(
|
49 |
label="OpenAI API KEY", type="password")
|
50 |
-
dino_prompt =
|
51 |
-
gpt_prompt =
|
52 |
-
input_image = gr.Image(type="numpy", label="Input
|
53 |
with gr.Column():
|
54 |
-
output_image = gr.Image(type="numpy", label="
|
55 |
submit_button = gr.Button()
|
56 |
|
57 |
submit_button.click(
|
|
|
9 |
from autodistill.core.custom_detection_model import CustomDetectionModel
|
10 |
|
11 |
MARKDOWN = """
|
12 |
+
# NESGPT-AutoAnnotator
|
13 |
+
Grounding DINO for Zero-Shot Carbon Sink Identification and Object Segmentation
|
14 |
+
."""
|
|
|
|
|
|
|
15 |
|
16 |
def respond(api_key, input_image, dino_prompt, gpt_prompt):
|
17 |
input_image = cv2.cvtColor(input_image, cv2.COLOR_BGR2RGB)
|
|
|
44 |
with gr.Column():
|
45 |
api_key_textbox = gr.Textbox(
|
46 |
label="OpenAI API KEY", type="password")
|
47 |
+
dino_prompt = buildings . parks .
|
48 |
+
gpt_prompt = carbon sinks
|
49 |
+
input_image = gr.Image(type="numpy", label="Input Location")
|
50 |
with gr.Column():
|
51 |
+
output_image = gr.Image(type="numpy", label="Carbon Sink Identifier")
|
52 |
submit_button = gr.Button()
|
53 |
|
54 |
submit_button.click(
|