ayoubkirouane commited on
Commit
bebd7c1
1 Parent(s): 664660a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - ayoubkirouane/captcha
4
+ - project-sloth/captcha-images
5
+ language:
6
+ - en
7
+ library_name: transformers
8
+ pipeline_tag: text-generation
9
+ ---
10
+
11
+ ## Base Model :
12
+ - vikhyatk/moondream2
13
+
14
+ ## Dataset :
15
+ - project-sloth/captcha-images
16
+
17
+
18
+
19
+ # Load model :
20
+
21
+
22
+ ```python
23
+
24
+ from transformers import AutoModelForCausalLM, AutoTokenizer
25
+ from PIL import Image
26
+
27
+ model_id = "ayoubkirouane/moondream2-image-captcha"
28
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
29
+ tokenizer = AutoTokenizer.from_pretrained(model_id , trust_remote_code=True)
30
+
31
+ image = Image.open('/content/test.png')
32
+ enc_image = model.encode_image(image)
33
+ print(model.answer_question(enc_image, "What does the text say?", tokenizer))
34
+
35
+
36
+ ```