mujeebanwar commited on
Commit
7611fce
·
verified ·
1 Parent(s): 68f2136

Upload 4 files

Browse files
Files changed (4) hide show
  1. Procfile +1 -0
  2. README.md +12 -11
  3. app.py +18 -0
  4. requirements.txt +2 -0
Procfile ADDED
@@ -0,0 +1 @@
 
 
1
+ web: gunicorn --bind 0.0.0.0:$PORT app:app
README.md CHANGED
@@ -1,11 +1,12 @@
1
- ---
2
- title: Testapp
3
- emoji: 📈
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
+ ---
2
+ title: My Simple Flask App
3
+ emoji: 🚀
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
+ # My First Flask App on Hugging Face Spaces
11
+
12
+ This is a simple "Hello World" application built with Flask to demonstrate deployment on Hugging Face.
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ from flask import Flask
4
+
5
+ # Initialize the Flask app
6
+ app = Flask(__name__)
7
+
8
+ # Define a route for the homepage
9
+ @app.route('/')
10
+ def hello():
11
+ """Returns a simple greeting message."""
12
+ return "Hello from a Flask App on Hugging Face Spaces!"
13
+
14
+ # This part is optional and is for running the app locally
15
+ if __name__ == '__main__':
16
+ # Running on 0.0.0.0 means it will be accessible from any IP address.
17
+ # The default port is 5000.
18
+ app.run(host='0.0.0.0', port=5000)
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ flask
2
+ gunicorn