base route
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,6 +45,10 @@ pipe = pipeline("document-question-answering", model="impira/layoutlm-document-q
|
|
45 |
# output = pipe(image, question)
|
46 |
# return output
|
47 |
|
|
|
|
|
|
|
|
|
48 |
@app.get("/hello")
|
49 |
def read_root():
|
50 |
image = 'https://templates.invoicehome.com/invoice-template-us-neat-750px.png'
|
|
|
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 |
# output = pipe(image, question)
|
46 |
# return output
|
47 |
|
48 |
+
@app.get("/")
|
49 |
+
def root():
|
50 |
+
return {"Hello":"world"}
|
51 |
+
|
52 |
@app.get("/hello")
|
53 |
def read_root():
|
54 |
image = 'https://templates.invoicehome.com/invoice-template-us-neat-750px.png'
|