Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,7 @@
|
|
| 1 |
-
from
|
| 2 |
-
|
| 3 |
-
app =
|
| 4 |
-
|
| 5 |
-
@app.
|
| 6 |
-
def
|
| 7 |
-
return
|
| 8 |
-
|
| 9 |
-
if __name__ == '__main__':
|
| 10 |
-
app.run(debug=True)
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/api")
|
| 6 |
+
def read_data():
|
| 7 |
+
return {"message": "Hello from FastAPI!"}
|
|
|
|
|
|
|
|
|