Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
@@ -56,8 +56,14 @@ async def lifespan(app: FastAPI):
|
|
56 |
# Clean up the model and release the resources
|
57 |
del sentiment_task
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
# Initialize the FastAPI app
|
60 |
-
app = FastAPI(lifespan=lifespan)
|
61 |
|
62 |
# Define the input data model
|
63 |
class TextInput(BaseModel):
|
|
|
56 |
# Clean up the model and release the resources
|
57 |
del sentiment_task
|
58 |
|
59 |
+
description = """
|
60 |
+
## Text Classification API
|
61 |
+
This app shows the sentiment of the text (positive, negative, or neutral)
|
62 |
+
Check out the docs for the `/analyze/{text}` endpoint below to try it out!
|
63 |
+
"""
|
64 |
+
|
65 |
# Initialize the FastAPI app
|
66 |
+
app = FastAPI(lifespan=lifespan, docs_url="/", description=description)
|
67 |
|
68 |
# Define the input data model
|
69 |
class TextInput(BaseModel):
|