Spaces:
Sleeping
Sleeping
File size: 501 Bytes
7611fce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 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) |