diff --git a/README.md b/README.md index d918159..7b237cb 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,14 @@ predicted_label = logits.argmax(-1).item() print(model.config.id2label[predicted_label]) ``` +```python +import gradio as gr +pipe = pipeline("image-classification", model="ailab/resnet-dogcat") +gr.Interface.from_pipeline(pipe).launch(server_name="0.0.0.0") +``` + +![1716790696165.png](https://img2.imgtp.com/2024/05/27/hIlNpCRj.png) + ## Conclusion This repository provides a comprehensive solution for training and performing inference on a Cat-Dog classification task using a ResNet-50 model. The training script demonstrates how to preprocess data, train the model, and save the trained model. The inference script shows how to use the trained model to classify new images. \ No newline at end of file