added requirements
Browse files
app.py
CHANGED
|
@@ -1,6 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.learner import load_learner # Assuming FastAI is used
|
| 3 |
|
|
|
|
|
|
|
|
|
|
| 4 |
# Load your pre-trained FastAI model (replace 'model.pkl' with your actual model path)
|
| 5 |
model = load_learner('model.pkl')
|
| 6 |
|
|
@@ -11,4 +14,4 @@ def classify_image(image):
|
|
| 11 |
|
| 12 |
# Update the Gradio interface
|
| 13 |
iface = gr.Interface(fn=classify_image, inputs=gr.inputs.Image(shape=(224, 224)), outputs='text')
|
| 14 |
-
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from fastai.learner import load_learner # Assuming FastAI is used
|
| 3 |
|
| 4 |
+
# NOTE: If you used any custom preprocessing steps or functions when training your model,
|
| 5 |
+
# make sure to include them here.
|
| 6 |
+
|
| 7 |
# Load your pre-trained FastAI model (replace 'model.pkl' with your actual model path)
|
| 8 |
model = load_learner('model.pkl')
|
| 9 |
|
|
|
|
| 14 |
|
| 15 |
# Update the Gradio interface
|
| 16 |
iface = gr.Interface(fn=classify_image, inputs=gr.inputs.Image(shape=(224, 224)), outputs='text')
|
| 17 |
+
iface.launch()
|