更新 README.md
This commit is contained in:
parent
c94d26d618
commit
30ca939316
|
@ -53,6 +53,14 @@ predicted_label = logits.argmax(-1).item()
|
||||||
print(model.config.id2label[predicted_label])
|
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
|
## 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.
|
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.
|
Loading…
Reference in New Issue