Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import tensorflow as tf
|
| 4 |
from tensorflow.keras.models import load_model
|
|
@@ -28,7 +27,7 @@ def predict(image):
|
|
| 28 |
# Create a Gradio interface
|
| 29 |
interface = gr.Interface(
|
| 30 |
fn=predict,
|
| 31 |
-
inputs=gr.
|
| 32 |
outputs="text",
|
| 33 |
title="Captcha OCR",
|
| 34 |
description="An OCR model to read captcha text from images."
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
from tensorflow.keras.models import load_model
|
|
|
|
| 27 |
# Create a Gradio interface
|
| 28 |
interface = gr.Interface(
|
| 29 |
fn=predict,
|
| 30 |
+
inputs=gr.Image(type="pil"), # Updated to use gr.Image directly
|
| 31 |
outputs="text",
|
| 32 |
title="Captcha OCR",
|
| 33 |
description="An OCR model to read captcha text from images."
|