fix: better unpacking
#2
by
ajinauser
- opened
app.py
CHANGED
@@ -103,7 +103,7 @@ def run_mapper(prompt: str, img_url: str, api_key: str):
|
|
103 |
except Exception as e:
|
104 |
raise gr.Error(f"Image load failed: {e}")
|
105 |
new_client.model.set_api_key(api_key)
|
106 |
-
img_proc, _
|
107 |
toks, maps = new_client.get_token_similarity_maps(prompt, img_proc)
|
108 |
if not toks:
|
109 |
raise gr.Error("Mapper returned no tokens.")
|
|
|
103 |
except Exception as e:
|
104 |
raise gr.Error(f"Image load failed: {e}")
|
105 |
new_client.model.set_api_key(api_key)
|
106 |
+
img_proc, *_ = new_client.process_image(img_url)
|
107 |
toks, maps = new_client.get_token_similarity_maps(prompt, img_proc)
|
108 |
if not toks:
|
109 |
raise gr.Error("Mapper returned no tokens.")
|