Spaces:
Runtime error
Runtime error
update app file
Browse files
app.py
CHANGED
|
@@ -13,6 +13,9 @@ model="visoc/Text2Question")
|
|
| 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("/generate")
|
| 17 |
def generate(text: str):
|
| 18 |
"""
|
|
|
|
| 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 read_root():
|
| 18 |
+
return {"Hello": "World!"}
|
| 19 |
@app.get("/generate")
|
| 20 |
def generate(text: str):
|
| 21 |
"""
|