Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
jackss011
/
dnlp-demo
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
b75d406
dnlp-demo
/
main.py
Jackss
Added root
b75d406
over 1 year ago
raw
Copy download link
history
blame
Safe
236 Bytes
from
fastapi
import
FastAPI
app = FastAPI()
@app.get(
'/'
)
def
read_root
():
return
{
"Hello"
:
"World!"
}
@app.get(
'/similarity'
)
def
similarity
(
input
):
output = pipe_flan(
input
)
return
{
"output"
: output[
0
][
"generated_text"
]}