Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,17 +2,9 @@ from fastapi import FastAPI
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
|
| 5 |
-
description = """
|
| 6 |
-
## Text Generation with 🤗 transformers, FastAPI, and Docker
|
| 7 |
-
|
| 8 |
-
This app shows how to do text generation with Flan-T5 using FastAPI in a Docker Space 🚀
|
| 9 |
-
|
| 10 |
-
Check out the [`/generate`](#/default/generate_generate_get) endpoint below to try it out!
|
| 11 |
-
"""
|
| 12 |
-
|
| 13 |
# NOTE - we configure docs_url to serve the interactive Docs at the root path
|
| 14 |
# of the app. This way, we can use the docs as a landing page for the app on Spaces.
|
| 15 |
-
app = FastAPI(docs_url="/"
|
| 16 |
|
| 17 |
pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 18 |
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# NOTE - we configure docs_url to serve the interactive Docs at the root path
|
| 6 |
# of the app. This way, we can use the docs as a landing page for the app on Spaces.
|
| 7 |
+
app = FastAPI(docs_url="/")
|
| 8 |
|
| 9 |
pipe = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 10 |
|