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

Function main

eval/grounding_eval/code/Aguvis/fun2bbox_eval_aguvis.py:114–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

read_jsonlFunction · 0.70
process_item_asyncFunction · 0.70

Tested by

no test coverage detected