Spaces:
Sleeping
Sleeping
Commit
·
b49483d
1
Parent(s):
02057bf
updated endpoint
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
|
13 |
# The generate() function is defined as a FastAPI route that takes a
|
14 |
# string parameter called text. The function generates text based on the # input using the pipeline() object, and returns a JSON response
|
15 |
# containing the generated text under the key "output"
|
16 |
-
@app.get("/
|
17 |
def generate(text: str):
|
18 |
"""
|
19 |
Using the text2text-generation pipeline from `transformers`, generate text
|
|
|
13 |
# The generate() function is defined as a FastAPI route that takes a
|
14 |
# string parameter called text. The function generates text based on the # input using the pipeline() object, and returns a JSON response
|
15 |
# containing the generated text under the key "output"
|
16 |
+
@app.get("/")
|
17 |
def generate(text: str):
|
18 |
"""
|
19 |
Using the text2text-generation pipeline from `transformers`, generate text
|