Spaces:
Sleeping
Sleeping
dipankardas011
commited on
Commit
•
bea1510
1
Parent(s):
66ca3c4
v2
Browse filesSigned-off-by: Dipankar Das <[email protected]>
app.py
CHANGED
@@ -14,6 +14,10 @@ model="google/flan-t5-small")
|
|
14 |
# The generate() function is defined as a FastAPI route that takes a
|
15 |
# string parameter called text. The function generates text based on the # input using the pipeline() object, and returns a JSON response
|
16 |
# containing the generated text under the key "output"
|
|
|
|
|
|
|
|
|
17 |
@app.get("/generate")
|
18 |
def generate(text: str):
|
19 |
"""
|
|
|
14 |
# The generate() function is defined as a FastAPI route that takes a
|
15 |
# string parameter called text. The function generates text based on the # input using the pipeline() object, and returns a JSON response
|
16 |
# containing the generated text under the key "output"
|
17 |
+
@app.get("/")
|
18 |
+
async def root():
|
19 |
+
return {"message": "Hello World"}
|
20 |
+
|
21 |
@app.get("/generate")
|
22 |
def generate(text: str):
|
23 |
"""
|