File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,20 @@ function get_prompt_from_diffusers_model(model: ModelData): string | undefined {
83
83
}
84
84
}
85
85
86
+ export const ben2 = ( model : ModelData ) : string [ ] => [
87
+ `import requests
88
+ from PIL import Image
89
+ from ben2 import AutoModel
90
+
91
+ url = "https://upload.wikimedia.org/wikipedia/commons/b/b6/Felis_catus-cat_on_snow.jpg"
92
+ image = Image.open(requests.get(url, stream=True).raw)
93
+
94
+ model = AutoModel.from_pretrained("${ model . id } ")
95
+ model.to("cuda").eval()
96
+ foreground = model.inference(image)
97
+ ` ,
98
+ ] ;
99
+
86
100
export const bertopic = ( model : ModelData ) : string [ ] => [
87
101
`from bertopic import BERTopic
88
102
Original file line number Diff line number Diff line change @@ -109,6 +109,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
109
109
countDownloads : `path_extension:"pth"` ,
110
110
snippets : snippets . audioseal ,
111
111
} ,
112
+ ben2 : {
113
+ prettyLabel : "BEN2" ,
114
+ repoName : "BEN2" ,
115
+ repoUrl : "https://github.com/PramaLLC/BEN2" ,
116
+ snippets : snippets . ben2 ,
117
+ filter : false ,
118
+ } ,
112
119
bertopic : {
113
120
prettyLabel : "BERTopic" ,
114
121
repoName : "BERTopic" ,
You can’t perform that action at this time.
0 commit comments