Spaces:
Running on Zero
Running on Zero
electblake commited on
Commit ·
8bb200e
1
Parent(s): 6e92dd9
fix(samples): resolve images from root app
Browse filesUpdate every Gradio example path for the consolidated root-level app so sample images resolve inside the Space repository again.
app.py
CHANGED
|
@@ -250,7 +250,7 @@ with gr.Blocks(title="NuMarkApp") as demo:
|
|
| 250 |
[
|
| 251 |
"Basic receipt",
|
| 252 |
str(
|
| 253 |
-
Path(__file__).
|
| 254 |
/ "data"
|
| 255 |
/ "samples"
|
| 256 |
/ "receipt-ocr-original.webp"
|
|
@@ -261,7 +261,7 @@ with gr.Blocks(title="NuMarkApp") as demo:
|
|
| 261 |
[
|
| 262 |
"Invoice with line items",
|
| 263 |
str(
|
| 264 |
-
Path(__file__).
|
| 265 |
/ "data"
|
| 266 |
/ "samples"
|
| 267 |
/ "invoice-with-items.png"
|
|
@@ -272,7 +272,7 @@ with gr.Blocks(title="NuMarkApp") as demo:
|
|
| 272 |
[
|
| 273 |
"Advanced bank statement",
|
| 274 |
str(
|
| 275 |
-
Path(__file__).
|
| 276 |
/ "data"
|
| 277 |
/ "samples"
|
| 278 |
/ "BankStatementChequing.png"
|
|
@@ -283,7 +283,7 @@ with gr.Blocks(title="NuMarkApp") as demo:
|
|
| 283 |
[
|
| 284 |
"Basic bank statement",
|
| 285 |
str(
|
| 286 |
-
Path(__file__).
|
| 287 |
/ "data"
|
| 288 |
/ "samples"
|
| 289 |
/ "bank statement blog image.webp"
|
|
@@ -300,7 +300,7 @@ with gr.Blocks(title="NuMarkApp") as demo:
|
|
| 300 |
]
|
| 301 |
for path in sorted(
|
| 302 |
path
|
| 303 |
-
for path in (Path(__file__).
|
| 304 |
"*.png"
|
| 305 |
)
|
| 306 |
if path.name
|
|
|
|
| 250 |
[
|
| 251 |
"Basic receipt",
|
| 252 |
str(
|
| 253 |
+
Path(__file__).parent
|
| 254 |
/ "data"
|
| 255 |
/ "samples"
|
| 256 |
/ "receipt-ocr-original.webp"
|
|
|
|
| 261 |
[
|
| 262 |
"Invoice with line items",
|
| 263 |
str(
|
| 264 |
+
Path(__file__).parent
|
| 265 |
/ "data"
|
| 266 |
/ "samples"
|
| 267 |
/ "invoice-with-items.png"
|
|
|
|
| 272 |
[
|
| 273 |
"Advanced bank statement",
|
| 274 |
str(
|
| 275 |
+
Path(__file__).parent
|
| 276 |
/ "data"
|
| 277 |
/ "samples"
|
| 278 |
/ "BankStatementChequing.png"
|
|
|
|
| 283 |
[
|
| 284 |
"Basic bank statement",
|
| 285 |
str(
|
| 286 |
+
Path(__file__).parent
|
| 287 |
/ "data"
|
| 288 |
/ "samples"
|
| 289 |
/ "bank statement blog image.webp"
|
|
|
|
| 300 |
]
|
| 301 |
for path in sorted(
|
| 302 |
path
|
| 303 |
+
for path in (Path(__file__).parent / "data" / "samples").glob(
|
| 304 |
"*.png"
|
| 305 |
)
|
| 306 |
if path.name
|