Почему мой код для flask не запускается?
Попробовал написать код на flask
app=Flaska(__name__)
@app.route('/')
def index():
return render_template("index.html")
@app.route('/predict', methods=['post'])
def predict():
link=request.form.get("link")
responce=requests.get(f'{link}')
soup = BeautifulSoup(responce.text, 'html.parser')
color=soup.find_all("p")
content=""
for i in color:
content+=i.text.strip()+" "
content=[preprocess(content)]
content=vectorizer.transform(content)
out_put=model.predict(content)
print(out_put)
return render_template("index.html",pred=f'Label:{out_put[0]}')
@app.route('/predict_text', methods=['post'])
def predict_text():
content=request.form.get("color_label")
print(content)
content=[preprocess(content)]
content=vectorizer.transform(content)
out_put=model.predict(content)
print(out_put)
return render_template("index.html",pred=f'Label:{out_put[0]}')
@app.route('/docs')
def docs():
return render_template("docs.html")
почему-то не запускаеся, не понимаю чем может быть вызвано, пишет, что ошибка как-то связана с Flaska