Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,17 @@
|
|
1 |
-
from
|
2 |
|
3 |
-
|
4 |
-
app = FastAPI()
|
5 |
|
6 |
-
#
|
7 |
-
@app.
|
8 |
-
def
|
9 |
-
return
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask
|
2 |
|
3 |
+
app = Flask(__name__)
|
|
|
4 |
|
5 |
+
# μΉ μλΉμ€μ λ£¨νΈ URLμ μ μν λμ λμμ μ μν©λλ€.
|
6 |
+
@app.route('/')
|
7 |
+
def index():
|
8 |
+
return 'μλ
νμΈμ! μ΄κ²μ κ°λ¨ν μΉ μλΉμ€μ
λλ€.'
|
9 |
|
10 |
+
# λ€λ₯Έ κ²½λ‘μ μ μν λμ λμμ μ μν μλ μμ΅λλ€.
|
11 |
+
@app.route('/hello')
|
12 |
+
def hello():
|
13 |
+
return 'μλ
νμΈμ! Flaskλ₯Ό μ΄μ©ν μΉ μλΉμ€μ μ€μ κ²μ νμν©λλ€.'
|
14 |
+
|
15 |
+
if __name__ == '__main__':
|
16 |
+
# μλ²λ₯Ό μ€νν©λλ€. λλ²κ·Έ λͺ¨λλ₯Ό νμ±ννλ©΄ μ½λ λ³κ²½μ΄ μλμΌλ‘ λ°μλ©λλ€.
|
17 |
+
app.run(debug=True)
|