BuckLakeAI / app /model.py
parkerjj's picture
First Commit for test Hugging face platform
547b48b
raw
history blame
244 Bytes
from transformers import pipeline
# 加载模型
#model = pipeline('text-classification')
def predict(text):
try:
result = text + ' is a good movie'
return result
except Exception as e:
return {'error': str(e)}