not-lain commited on
Commit
3e44479
1 Parent(s): a025529
Files changed (1) hide show
  1. README.md +31 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - custom_code
5
+ ---
6
+ # How to use
7
+ you can the model via the command
8
+ ```python
9
+ from transformers import AutoModelForImageClassification
10
+ model = AutoModelForImageClassification.from_pretrained("not-lain/MyRepo", trust_remote_code=True)
11
+ ```
12
+ or you can use the pipeline
13
+ ```python
14
+ from transformers import pipeline
15
+ pipe = pipeline(model="not-lain/MyRepo", trust_remote_code=True)
16
+ pipe(
17
+ "url",
18
+ download=True, # will call the download_img method
19
+ clean_output=False # will be passed as postprocess_kwargs
20
+ )
21
+ ```
22
+ # parameters
23
+ the pipeline supports the following parameters :
24
+ * download
25
+ * clean_output
26
+
27
+ you can also use the following method to download images from the web
28
+ ```python
29
+ pipe.download_img(url)
30
+ ```
31
+