Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def predict_receipt(image):
|
|
| 32 |
# Create Gradio Interface
|
| 33 |
interface = gr.Interface(
|
| 34 |
fn=predict_receipt,
|
| 35 |
-
inputs=gr.
|
| 36 |
outputs="json",
|
| 37 |
title="Receipt Information Analyzer",
|
| 38 |
description="Upload a scanned receipt image to extract information like company name, date, address, and total."
|
|
@@ -47,3 +47,4 @@ if __name__ == "__main__":
|
|
| 47 |
|
| 48 |
|
| 49 |
|
|
|
|
|
|
| 32 |
# Create Gradio Interface
|
| 33 |
interface = gr.Interface(
|
| 34 |
fn=predict_receipt,
|
| 35 |
+
inputs=gr.Image(type="pil"), # Use `gr.Image` instead of `gr.inputs.Image`
|
| 36 |
outputs="json",
|
| 37 |
title="Receipt Information Analyzer",
|
| 38 |
description="Upload a scanned receipt image to extract information like company name, date, address, and total."
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
+
|