howzus commited on
Commit
02b3f90
1 Parent(s): 320f1ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
  from fastapi import FastAPI
2
  from transformers import pipeline
3
 
4
- # Create a new FastAPI app instance
5
- app = FastAPI()
 
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