NLP模型的Heroku部署显示错误(应用程序在本地运行良好)

发布于 2025-02-13 00:51:46 字数 422 浏览 2 评论 0原文

我已经在Heroku上部署了烧瓶应用程序(NLP型号)。我基本上是一个价格预测模型,其中一些列在日语中,我将NLP + Nagisa库用于令牌化,而某些列是数值数据。 我腌制了矢量化和模型,并最终将它们添加到我的烧瓶API中。但是在部署后,当我在前端添加值并单击预测按钮时,结果没有显示。 这是我面临的确切错误。

代码

tokenizer_jp的确切代码是:

def tokenize_jp(doc):
        doc = nagisa.tagging(doc)
        return doc.words

我无法弄清楚如何解决此问题?

I have deployed my Flask App ( NLP model ) on Heroku. I was basically a price prediction model where some columns were in Japanese where I applied NLP + Nagisa Library for tokenization and some columns were numerical data.
I pickled vectorizers and the model and Finally added them to my Flask API. But after deployment when I added the values in the frontend and clicked on Predict button, the result is not getting displayed.
This is the exact error I am facing.

Code

The exact code of Tokenizer_jp is :

def tokenize_jp(doc):
        doc = nagisa.tagging(doc)
        return doc.words

I am not able to figure out how to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文