stphtan94117 commited on
Commit
9dd6848
·
verified ·
1 Parent(s): a4cc58b

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -24
app.py DELETED
@@ -1,24 +0,0 @@
1
- import gradio as gr
2
- from OCR_test import process_image
3
-
4
- def detect_objects(image):
5
- try:
6
- # Call the `process_image` function with the image path
7
- result = process_image(image)
8
- return result
9
- except Exception as e:
10
- # Return any errors encountered during processing
11
- return f"Error: {e}"
12
-
13
- # Define the Gradio interface
14
- interface = gr.Interface(
15
- fn=detect_objects,
16
- inputs=gr.Image(type="filepath", label="Upload Image"), # Set to "filepath" to pass file path directly
17
- outputs=gr.Textbox(label="Detection Results"),
18
- title="OCR Object Detection",
19
- description="Upload an image to get OCR results."
20
- )
21
-
22
- # Launch the Gradio app
23
- if __name__ == "__main__":
24
- interface.launch()