Spaces:
Sleeping
Sleeping
update fast api
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ Check out the docs for the `/predict` endpoint below to try it out!
|
|
26 |
|
27 |
# NOTE - we configure docs_url to serve the interactive Docs at the root path
|
28 |
# of the app. This way, we can use the docs as a landing page for the app on Spaces.
|
29 |
-
app = FastAPI()
|
30 |
|
31 |
pipe = pipeline("document-question-answering", model="impira/layoutlm-document-qa")
|
32 |
|
@@ -45,9 +45,6 @@ pipe = pipeline("document-question-answering", model="impira/layoutlm-document-q
|
|
45 |
# output = pipe(image, question)
|
46 |
# return output
|
47 |
|
48 |
-
@app.get("/")
|
49 |
-
def read_root():
|
50 |
-
return {"Hello":"world"}
|
51 |
|
52 |
@app.get("/hello")
|
53 |
def read_root():
|
|
|
26 |
|
27 |
# NOTE - we configure docs_url to serve the interactive Docs at the root path
|
28 |
# of the app. This way, we can use the docs as a landing page for the app on Spaces.
|
29 |
+
app = FastAPI(docs_url="/", description=description)
|
30 |
|
31 |
pipe = pipeline("document-question-answering", model="impira/layoutlm-document-qa")
|
32 |
|
|
|
45 |
# output = pipe(image, question)
|
46 |
# return output
|
47 |
|
|
|
|
|
|
|
48 |
|
49 |
@app.get("/hello")
|
50 |
def read_root():
|