Noveramaaz
commited on
Commit
•
9b94f9a
1
Parent(s):
8d4a0f7
Update main.py
Browse files
main.py
CHANGED
@@ -46,6 +46,9 @@ class TextInput(BaseModel):
|
|
46 |
async def welcome():
|
47 |
return "Welcome to our Text Classification API"
|
48 |
|
|
|
|
|
|
|
49 |
# Validate input text length
|
50 |
MAX_TEXT_LENGTH = 1000
|
51 |
|
@@ -126,7 +129,8 @@ class TextInput(BaseModel):
|
|
126 |
# Define the welcome endpoint
|
127 |
@app.get('/')
|
128 |
async def welcome():
|
129 |
-
|
|
|
130 |
|
131 |
# Validate input text length
|
132 |
MAX_TEXT_LENGTH = 1000
|
|
|
46 |
async def welcome():
|
47 |
return "Welcome to our Text Classification API"
|
48 |
|
49 |
+
# Redirect to the Swagger UI page
|
50 |
+
return RedirectResponse(url="/docs")
|
51 |
+
|
52 |
# Validate input text length
|
53 |
MAX_TEXT_LENGTH = 1000
|
54 |
|
|
|
129 |
# Define the welcome endpoint
|
130 |
@app.get('/')
|
131 |
async def welcome():
|
132 |
+
# Redirect to the Swagger UI page
|
133 |
+
return RedirectResponse(url="/docs")
|
134 |
|
135 |
# Validate input text length
|
136 |
MAX_TEXT_LENGTH = 1000
|