Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
dd1f1fd
1
Parent(s):
6b501da
update
Browse files
embodied_gen/utils/gpt_clients.py
CHANGED
|
@@ -185,9 +185,8 @@ if __name__ == "__main__":
|
|
| 185 |
text_prompt="What is the content in each image?",
|
| 186 |
image_base64=combine_images_to_base64(
|
| 187 |
[
|
| 188 |
-
"
|
| 189 |
-
"
|
| 190 |
-
"outputs/text2image/demo_objects/cardboard/sample_1.jpg",
|
| 191 |
]
|
| 192 |
), # input raw image_path if only one image
|
| 193 |
)
|
|
@@ -196,10 +195,8 @@ if __name__ == "__main__":
|
|
| 196 |
response = GPT_CLIENT.query(
|
| 197 |
text_prompt="What is the content in the images?",
|
| 198 |
image_base64=[
|
| 199 |
-
Image.open("
|
| 200 |
-
Image.open(
|
| 201 |
-
"outputs/imageto3d/v2/cups/sample_69/URDF_sample_69/qa_renders/image_color/003.png" # noqa
|
| 202 |
-
),
|
| 203 |
],
|
| 204 |
)
|
| 205 |
print(response)
|
|
|
|
| 185 |
text_prompt="What is the content in each image?",
|
| 186 |
image_base64=combine_images_to_base64(
|
| 187 |
[
|
| 188 |
+
"apps/assets/example_image/sample_02.jpg",
|
| 189 |
+
"apps/assets/example_image/sample_03.jpg",
|
|
|
|
| 190 |
]
|
| 191 |
), # input raw image_path if only one image
|
| 192 |
)
|
|
|
|
| 195 |
response = GPT_CLIENT.query(
|
| 196 |
text_prompt="What is the content in the images?",
|
| 197 |
image_base64=[
|
| 198 |
+
Image.open("apps/assets/example_image/sample_02.jpg"),
|
| 199 |
+
Image.open("apps/assets/example_image/sample_03.jpg"),
|
|
|
|
|
|
|
| 200 |
],
|
| 201 |
)
|
| 202 |
print(response)
|
embodied_gen/utils/gpt_config.yaml
CHANGED
|
@@ -9,6 +9,6 @@ gpt-4o:
|
|
| 9 |
|
| 10 |
qwen2.5-vl:
|
| 11 |
endpoint: https://openrouter.ai/api/v1
|
| 12 |
-
api_key: sk-or-v1-
|
| 13 |
api_version: null
|
| 14 |
model_name: qwen/qwen2.5-vl-72b-instruct:free
|
|
|
|
| 9 |
|
| 10 |
qwen2.5-vl:
|
| 11 |
endpoint: https://openrouter.ai/api/v1
|
| 12 |
+
api_key: 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
|
| 13 |
api_version: null
|
| 14 |
model_name: qwen/qwen2.5-vl-72b-instruct:free
|
embodied_gen/validators/urdf_convertor.py
CHANGED
|
@@ -139,9 +139,7 @@ class URDFGenerator(object):
|
|
| 139 |
|
| 140 |
def parse_response(self, response: str) -> dict[str, any]:
|
| 141 |
lines = response.split("\n")
|
| 142 |
-
print("1", lines)
|
| 143 |
lines = [line.strip() for line in lines if line]
|
| 144 |
-
print("2", lines)
|
| 145 |
category = lines[0].split(": ")[1]
|
| 146 |
description = lines[1].split(": ")[1]
|
| 147 |
min_height, max_height = map(
|
|
|
|
| 139 |
|
| 140 |
def parse_response(self, response: str) -> dict[str, any]:
|
| 141 |
lines = response.split("\n")
|
|
|
|
| 142 |
lines = [line.strip() for line in lines if line]
|
|
|
|
| 143 |
category = lines[0].split(": ")[1]
|
| 144 |
description = lines[1].split(": ")[1]
|
| 145 |
min_height, max_height = map(
|