Baskar2005 commited on
Commit
a75aff6
·
verified ·
1 Parent(s): 76bd113

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def home():
7
+ return {"message": "Welcome to my FastAPI app on HF Spaces!"}
8
+
9
+ @app.get("/hello/{name}")
10
+ def say_hello(name: str):
11
+ return {"message": f"Hello, {name}!"}