Spaces:
Paused
Paused
Commit ·
247bdcb
1
Parent(s): 6e7460b
Modified app.py - Added extra APIs
Browse files
app.py
CHANGED
|
@@ -5,3 +5,11 @@ app = FastAPI()
|
|
| 5 |
@app.get("/")
|
| 6 |
def greet_json():
|
| 7 |
return {"Hello": "World!"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
@app.get("/")
|
| 6 |
def greet_json():
|
| 7 |
return {"Hello": "World!"}
|
| 8 |
+
|
| 9 |
+
@app.get("/text")
|
| 10 |
+
def greet_text():
|
| 11 |
+
return "Hello Akanksh B C!"
|
| 12 |
+
|
| 13 |
+
@app.post("/sum")
|
| 14 |
+
def sum_numbers(a: int, b: int):
|
| 15 |
+
return {"sum": a + b}
|