Category : flask

I’m trying to deploy a Flask application using Apache Spark 3.1.1 on Kubernetes. app.py from flask import Flask from pyspark.sql import SparkSession app = Flask(__name__) app.debug = True @app.route(‘/’) def main(): print("Start of Code") spark = SparkSession.builder.appName("Test").getOrCreate() sc=spark.sparkContext spark.stop() print("End of Code") return ‘hi’ if __name__ == ‘__main__’: app.run() requirements.txt flask pyspark Dockerfile NOTE: "spark-py" ..

Read more

I have a watiress API, I am trying to make it public in a docker contain, However i am receiving the following error: return self.socket.bind(addr) fleettracker_1 | OSError: [Errno 99] Cannot assign requested address Here is my Docker-compose yml version: ‘3’ services: fleettracker: build: ./fleettracker ports: – "5000:5017" links: – db networks: – fullstack db: ..

Read more

Please help I’m following a tutorial for flask but every time I try to build up this one application the route returns an internal server error and the problem seems to be with "render template". Here’s how I structured my app: "python" |_books.py |_DockerFile | |_templates index.html Here’s the code in each of the files. ..

Read more

My local folder looks like this: recsys/ app/ models/ model.pth # trained model static/ styles.css templates/ main.html api.py # Flask API data/ dict_data/ … # pickled dictionaries train_data/ … # training csv files Dockerfile requirements.txt … Where I have api.py file,running which I can get my web-page on http://127.0.0.1:5000/ and everything works fine. Now I ..

Read more

I am working on a project using Flask, a framework to build web application in Python. Here is the structure of my minimal application: . ├── my_app │   ├── __init__.py │   ├── static │   │   ├── css │   │   │   ├── main.css │   │   │   └── main.css.map │   │   ├── js │   │   │   └── ..

Read more