"#images = ['http://modelscope-open.oss-cn-hangzhou.aliyuncs.com/images/road.png']
images = ['/wzdata1/xiangnanli/data/LLM_Testdata/fewshot/C51DD848-73D3-4bdf-A019-8D52BE5AD4AB.png']
query = 'Describe this image.'
response, = inference(model, template, query, images=images)
print(f'query: {query}')
print(f'response: {response}')
query = '.Are there any pedestrians or vehicles in this image?'
response, _ = inference(model, template, query, images=images)
print(f'query: {query}')
print(f'response: {response}')
ModelScope中,需要跑一个图像目录,在推理每个图像的时候,应该需要清除一下history吧(如果每个图像推理的时候都不清除历史,输出结果应该是不理想的吧),这个如何实现呢?"
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352