Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1 +1,11 @@
|
|
| 1 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI(title="Deploying FastAPI Apps on Huggingface")
|
| 4 |
+
|
| 5 |
+
@app.get("/", tags=["Home"])
|
| 6 |
+
def api_home():
|
| 7 |
+
return {'detail': 'Welcome to FastAPI TextGen Tutorial!'}
|
| 8 |
+
|
| 9 |
+
@app.post("/",tags=["hello"])
|
| 10 |
+
def hello(input_prompt: str):
|
| 11 |
+
return f"hello {input_prompt}!"
|