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

Function main

eval/grounding_eval/code/Aguvis/bbox2text_eval_aguvis.py:98–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 return correct
97
98async def main():
99 model_name = "aguivs"
100 total = 0
101 correct = 0
102 json_data_path = "your/path/to/the/dataset"
103 data = read_jsonl(json_data_path)
104 client = AsyncClient(api_key="sk-123", base_url='http://localhost:8000/v1')
105 semaphore = asyncio.Semaphore(16)
106 tasks = []
107 for item in data:
108 task = asyncio.create_task(process_item_async(item, client, model_name,semaphore))
109 tasks.append(task)
110
111 results = await asyncio.gather(*tasks)
112 for result in results:
113 correct += result
114 total += 1
115 print(correct, total, correct / total)
116
117 return 0
118
119if __name__=="__main__":
120 asyncio.run(main())

Callers 1

Calls 2

read_jsonlFunction · 0.70
process_item_asyncFunction · 0.70

Tested by

no test coverage detected