logo
Browse Source

Add init

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
124929812b
  1. 19
      __init__.py
  2. 2
      dpr.py

19
__init__.py

@ -0,0 +1,19 @@
# Copyright 2021 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .dpr import Dpr
def dpr(model_name: str):
return Dpr(model_name)

2
nlp_dpr.py → dpr.py

@ -11,7 +11,7 @@ log = logging.getLogger()
@register(output_schema=['vec'])
class NlpDpr(NNOperator):
class Dpr(NNOperator):
"""
This class uses Dense Passage Retrieval to generate embedding.
Dense Passage Retrieval (DPR) is a set of tools and models for state-of-the-art open-domain Q&A research.
Loading…
Cancel
Save