Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
app
|
|
|
|
| 6 |
|
| 7 |
# Initialize the text generation pipeline
|
| 8 |
# This function will be able to generate text
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# NOTE - we configure docs_url to serve the interactive Docs at the root path
|
| 5 |
+
# of the app. This way, we can use the docs as a landing page for the app on Spaces.
|
| 6 |
+
app = FastAPI(docs_url="/")
|
| 7 |
|
| 8 |
# Initialize the text generation pipeline
|
| 9 |
# This function will be able to generate text
|