Spaces:
Running
Running
Rename main to app.py
Browse files- main β app.py +4 -2
main β app.py
RENAMED
@@ -1,7 +1,9 @@
|
|
1 |
from fastapi import FastAPI
|
2 |
|
|
|
3 |
app = FastAPI()
|
4 |
|
|
|
5 |
@app.get("/")
|
6 |
-
|
7 |
-
return {"
|
|
|
1 |
from fastapi import FastAPI
|
2 |
|
3 |
+
# Create an instance of the FastAPI class
|
4 |
app = FastAPI()
|
5 |
|
6 |
+
# Define a route for the root endpoint
|
7 |
@app.get("/")
|
8 |
+
def read_root():
|
9 |
+
return {"message": "Hello, World!"}
|