NowLoadY commited on
Commit
5f9865d
·
1 Parent(s): 4da6d0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -7,7 +7,7 @@ import requests
7
  openai.api_key = "your_api_key_here"
8
 
9
  # Initialize OCR reader
10
- reader = easyocr.Reader(['ch_sim', 'en'])
11
 
12
  # Define the OCR function
13
  # Update the ocr_gpt function to accept the API key as an input
@@ -31,5 +31,4 @@ gpt_opinion_output = gr.outputs.Textbox(label="GPT Opinion on Image Information"
31
 
32
 
33
  # Create Gradio interface
34
- iface = gr.Interface(fn=ocr_gpt, inputs=[image_input, gpt_input, api_key_input], outputs=[ocr_output, gpt_opinion_output])
35
- #iface.launch(share=True)
 
7
  openai.api_key = "your_api_key_here"
8
 
9
  # Initialize OCR reader
10
+ reader = easyocr.Reader(['ch_sim', 'en'],gpu=False)
11
 
12
  # Define the OCR function
13
  # Update the ocr_gpt function to accept the API key as an input
 
31
 
32
 
33
  # Create Gradio interface
34
+ iface = gr.Interface(fn=ocr_gpt, inputs=[image_input, gpt_input, api_key_input], outputs=[ocr_output, gpt_opinion_output])