MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / main

Function main

eval/grounding_eval/code/Aguvis/text2bbox_eval_aguvis.py:115–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 return correct
114
115async def main():
116 model_name = "aguivs"
117 total = 0
118 correct = 0
119 json_data_path = "your/path/to/the/dataset"
120 data = read_jsonl(json_data_path)
121 client = AsyncClient(api_key="sk-123", base_url='http://localhost:8000/v1')
122 semaphore = asyncio.Semaphore(16)
123 tasks = []
124 for item in data:
125 task = asyncio.create_task(process_item_async(item, client, model_name,semaphore))
126 tasks.append(task)
127
128 results = await asyncio.gather(*tasks)
129 for result in results:
130 correct += result
131 total += 1
132 print(correct, total, correct / total)
133
134
135if __name__=="__main__":

Callers 1

Calls 2

read_jsonlFunction · 0.70
process_item_asyncFunction · 0.70

Tested by

no test coverage detected