Files changed (1) hide show
  1. README.md +8 -0
README.md CHANGED
@@ -37,6 +37,14 @@ with torch.no_grad():
37
  line_image = Image.fromarray(outputs.pixel_values[0].numpy().astype("uint8"), mode="L")
38
  line_image.save("./line_image.png")
39
  ```
 
 
 
 
 
 
 
 
40
 
41
  |`sample.jpg`|Generated line image|
42
  |-|-|
 
37
  line_image = Image.fromarray(outputs.pixel_values[0].numpy().astype("uint8"), mode="L")
38
  line_image.save("./line_image.png")
39
  ```
40
+ or you can use the pipeline
41
+
42
+ ```py
43
+ from transformers import pipeline
44
+
45
+ pipe = pipeline("image-to-image", model="p1atdev/MangaLineExtraction-hf", trust_remote_code=True)
46
+ pipe("sample.jpg")
47
+ ```
48
 
49
  |`sample.jpg`|Generated line image|
50
  |-|-|