Unverified Commit c5f0288b authored by amyeroberts's avatar amyeroberts Committed by GitHub
Browse files

[`SuperPoint`] Fix doc example (#29816)

[SuperPoint] Fix doc example
parent 7e1413d1
...@@ -423,7 +423,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel): ...@@ -423,7 +423,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel):
Examples: Examples:
```python ```python
>>> from transformers import AutoImageProcessor, AutoModel >>> from transformers import AutoImageProcessor, SuperPointForKeypointDetection
>>> import torch >>> import torch
>>> from PIL import Image >>> from PIL import Image
>>> import requests >>> import requests
...@@ -432,7 +432,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel): ...@@ -432,7 +432,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel):
>>> image = Image.open(requests.get(url, stream=True).raw) >>> image = Image.open(requests.get(url, stream=True).raw)
>>> processor = AutoImageProcessor.from_pretrained("magic-leap-community/superpoint") >>> processor = AutoImageProcessor.from_pretrained("magic-leap-community/superpoint")
>>> model = AutoModel.from_pretrained("magic-leap-community/superpoint") >>> model = SuperPointForKeypointDetection.from_pretrained("magic-leap-community/superpoint")
>>> inputs = processor(image, return_tensors="pt") >>> inputs = processor(image, return_tensors="pt")
>>> outputs = model(**inputs) >>> outputs = model(**inputs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment