Spaces:
Sleeping
Sleeping
Tony Shepherd
commited on
Commit
·
aa2cf7d
1
Parent(s):
9033156
re-inserted "read_root" function (get) for hf browser to show status
Browse files
main.py
CHANGED
@@ -2,10 +2,16 @@ from transformers import pipeline
|
|
2 |
from fastapi import FastAPI
|
3 |
from payload import SomeText
|
4 |
|
|
|
|
|
5 |
app = FastAPI()
|
6 |
|
7 |
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
|
8 |
|
|
|
|
|
|
|
|
|
9 |
@app.get("/api/check-heartbeat")
|
10 |
def get_heartbeat():
|
11 |
return {"Status": "Running. Try out the endpoints in swagger"}
|
|
|
2 |
from fastapi import FastAPI
|
3 |
from payload import SomeText
|
4 |
|
5 |
+
|
6 |
+
|
7 |
app = FastAPI()
|
8 |
|
9 |
pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
|
10 |
|
11 |
+
@app.get("/")
|
12 |
+
def read_root():
|
13 |
+
return {'detail': 'API seems to be working'}
|
14 |
+
|
15 |
@app.get("/api/check-heartbeat")
|
16 |
def get_heartbeat():
|
17 |
return {"Status": "Running. Try out the endpoints in swagger"}
|