Spaces:
Build error
Build error
| import gradio as gr | |
| from model_detection import image_generation_detection | |
| def classify_image(image): | |
| # Call the function from model_detection.py | |
| result = image_generation_detection(image) | |
| return result | |
| # Create the Gradio interface | |
| iface = gr.Interface( | |
| fn=classify_image, | |
| inputs=gr.Image(type="filepath"), | |
| outputs=gr.Textbox(), | |
| title="Image Classification Demo", | |
| description="Upload an image and classify it using the model." | |
| ) | |
| # Launch the app | |
| if __name__ == "__main__": | |
| iface.launch() | |