Во время развертывания я столкнулся со следующей ошибкой:
Код: Выделить всё
LAMBDA_WARNING: Unhandled exception. The most likely cause is an issue in the function code. However, in rare cases, a Lambda runtime update can cause unexpected function behavior. For functions using managed runtimes, runtime updates can be triggered by a function change, or can be applied automatically. To determine if the runtime has been updated, check the runtime version in the INIT_START log entry. If this error correlates with a change in the runtime version, you may be able to mitigate this error by temporarily rolling back to the previous runtime version. For more information, see https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html [ERROR]
Runtime.ImportModuleError: Unable to import module 'vc__handler__python': No module named 'sklearn' Traceback (most recent call last):
Вот соответствующий фрагмент кода из моего индекса. .py:
Код: Выделить всё
import joblib
# Load preprocessed data
words = joblib.load('words.pkl')
classes = joblib.load('classes.pkl')
nb_classifier = joblib.load('nb_classifier.joblib')
Код: Выделить всё
.gitignore
README.md
requirements.txt
vercel.json
api/
classes.pkl
index.py
intents.json
nb_classifier.joblib
words.pkl
Код: Выделить всё
Flask==3.0.2
Flask-Cors==4.0.0
joblib==1.3.2
nltk==3.8.1
numpy==1.26.3
wikipedia==1.4.0
Подробнее здесь: https://stackoverflow.com/questions/781 ... deployment
Мобильная версия