harsh-manvar commited on
Commit
ed4e27f
·
verified ·
1 Parent(s): 52d1916

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -90,27 +90,27 @@ with gr.Blocks() as demo:
90
  )
91
 
92
  with gr.Tab("OCR"):
93
- with gr.Row():
94
- with gr.Column():
95
- image_input = gr.Image(
96
- label="Upload Image",
97
- type="filepath",
98
- image_mode="RGB",
99
- )
100
- ocr_submit_button = gr.Button("Extract Text")
 
 
 
 
 
 
 
101
 
102
- with gr.Column():
103
- ocr_output = gr.Textbox(
104
- label="Extracted Text",
105
- lines=10,
106
- interactive=False,
107
- )
108
-
109
- ocr_submit_button.click(
110
- ocr_image,
111
- inputs=[image_input],
112
- outputs=ocr_output,
113
- )
114
 
115
  # Launch the app
116
  demo.launch()
 
90
  )
91
 
92
  with gr.Tab("OCR"):
93
+ with gr.Row():
94
+ with gr.Column():
95
+ image_input = gr.Image(
96
+ label="Upload Image",
97
+ type="filepath", # Corrected type
98
+ image_mode="RGB",
99
+ )
100
+ ocr_submit_button = gr.Button("Extract Text")
101
+
102
+ with gr.Column():
103
+ ocr_output = gr.Textbox(
104
+ label="Extracted Text",
105
+ lines=10,
106
+ interactive=False,
107
+ )
108
 
109
+ ocr_submit_button.click(
110
+ ocr_image,
111
+ inputs=[image_input],
112
+ outputs=ocr_output,
113
+ )
 
 
 
 
 
 
 
114
 
115
  # Launch the app
116
  demo.launch()