mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 12:39:25 +01:00
[swingdeploy]sentence_embedding
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/14395686 * swingdeploy_sentence_embedding
This commit is contained in:
@@ -121,6 +121,7 @@ def pipeline(task: str = None,
|
||||
ignore_file_pattern=ignore_file_pattern)
|
||||
if pipeline_name is None and kwargs.get('llm_first'):
|
||||
pipeline_name = llm_first_checker(model, model_revision)
|
||||
kwargs.pop('llm_first')
|
||||
pipeline_props = {'type': pipeline_name}
|
||||
if pipeline_name is None:
|
||||
# get default pipeline for this task
|
||||
|
||||
@@ -145,6 +145,19 @@
|
||||
"image":"http://modelscope.oss-cn-beijing.aliyuncs.com/demo/images/image_salient_detection.jpg"
|
||||
}
|
||||
},
|
||||
"sentence-embedding":{
|
||||
"input": {
|
||||
"source_sentence":[
|
||||
"吃完海鲜可以喝牛奶吗?"
|
||||
],
|
||||
"sentences_to_compare":[
|
||||
"不可以,早晨喝牛奶不科学",
|
||||
"吃了海鲜后是不能再喝牛奶的,因为牛奶中含得有维生素C,如果海鲜喝牛奶一起服用会对人体造成一定的伤害",
|
||||
"吃海鲜是不能同时喝牛奶吃水果,这个至少间隔6小时以上才可以。",
|
||||
"吃海鲜是不可以吃柠檬的因为其中的维生素C会和海鲜中的矿物质形成砷"
|
||||
]
|
||||
}
|
||||
},
|
||||
"shop-segmentation":{
|
||||
"input":{
|
||||
"image":"http://modelscope.oss-cn-beijing.aliyuncs.com/demo/images/shop_segmentation.jpg"
|
||||
|
||||
Reference in New Issue
Block a user