testapp / app.py
mujeebanwar's picture
Upload 4 files
7611fce verified
Raw History Blame Contribute Delete
501 Bytes
# app.py
from flask import Flask
# Initialize the Flask app
app = Flask(__name__)
# Define a route for the homepage
@app.route('/')
def hello():
"""Returns a simple greeting message."""
return "Hello from a Flask App on Hugging Face Spaces!"
# This part is optional and is for running the app locally
if __name__ == '__main__':
# Running on 0.0.0.0 means it will be accessible from any IP address.
# The default port is 5000.
app.run(host='0.0.0.0', port=5000)