tregu0458 commited on
Commit
6299828
·
verified ·
1 Parent(s): 3ea736a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1 +1,11 @@
1
- from TextGen import app
 
 
 
 
 
 
 
 
 
 
 
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}!"