Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,9 +20,9 @@ def sepia(input_img):
|
|
| 20 |
## required positional arguments: 'inputs' and 'outputs'
|
| 21 |
def process_image(image):
|
| 22 |
# Convert the input image to the format expected by the model
|
| 23 |
-
|
| 24 |
# Run the image through the model
|
| 25 |
-
result = client(inputs=
|
| 26 |
# Extract the text from the result
|
| 27 |
text = result['text']
|
| 28 |
return text
|
|
@@ -43,7 +43,7 @@ with gr.Blocks() as generated_output:
|
|
| 43 |
with gr.Row():
|
| 44 |
gr.Interface(
|
| 45 |
fn=process_image,
|
| 46 |
-
inputs=
|
| 47 |
outputs=gr.Textbox(label="Recognized Text"),
|
| 48 |
show_progress="full")
|
| 49 |
#with gr.Blocks() as generated_output:
|
|
|
|
| 20 |
## required positional arguments: 'inputs' and 'outputs'
|
| 21 |
def process_image(image):
|
| 22 |
# Convert the input image to the format expected by the model
|
| 23 |
+
output_img = np.array(output_img)
|
| 24 |
# Run the image through the model
|
| 25 |
+
result = client(inputs=output_img)
|
| 26 |
# Extract the text from the result
|
| 27 |
text = result['text']
|
| 28 |
return text
|
|
|
|
| 43 |
with gr.Row():
|
| 44 |
gr.Interface(
|
| 45 |
fn=process_image,
|
| 46 |
+
inputs=output_img,
|
| 47 |
outputs=gr.Textbox(label="Recognized Text"),
|
| 48 |
show_progress="full")
|
| 49 |
#with gr.Blocks() as generated_output:
|