[Model] Upgrade uie (#458)

* Upgrade uie c++ implement

* upgrade python UIEModel inherit FastDeployModel

* Add schema language support; Skip infer when no prompts

* Adjust the schema language arg pos

* Add schema_language for python and cpp

* update pybind for uie

* Fix the args of uie

* Add SchemaLanguage
This commit is contained in:
Jack Zhou
2022-10-30 17:04:05 +08:00
committed by GitHub
parent d70b6c99df
commit ee2c6136fc
8 changed files with 128 additions and 66 deletions

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import fastdeploy
from fastdeploy.text import UIEModel
from fastdeploy.text import UIEModel, SchemaLanguage
import os
from pprint import pprint
@@ -80,7 +80,8 @@ if __name__ == "__main__":
position_prob=0.5,
max_length=128,
schema=schema,
runtime_option=runtime_option)
runtime_option=runtime_option,
schema_language=SchemaLanguage.ZH)
print("1. Named Entity Recognition Task")
print(f"The extraction schema: {schema}")