uf-aice-lab commited on
Commit
a444be6
·
1 Parent(s): 884eb9a

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -0
README.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ pipeline_tag: image-to-text
6
+ ---
7
+ # git_20
8
+
9
+ <!-- Provide a quick summary of what the model is/does. -->
10
+ This model is fine-tuned with Microsoft GIT with 1 Nvidia A100-80G GPU. We extracted 100,000 student assignments containing teacher feedback from 3 million student assignments as training data. The training data is divided into the image part of student assignments and the text part of teacher feedback. git_20 consists of 18 layers and over 170 million parameters, consuming up to 0.7 gigabytes of disk space. The project aims to use multi-modal and multi-task deep learning models to create a machine learning pipeline that provides automatic diagnostic feedback for students' mathematical reasoning. Researchers can experiment with and finetune the model to help construct multimodel that can effectively provide automatic diagnostic feedback for students' mathematical reasoning.
11
+ ### Here is how to use it with texts in HuggingFace
12
+ ```python
13
+ from transformers import AutoModelForCausalLM
14
+ from transformers import AutoProcessor
15
+ from PIL import Image
16
+ model = AutoModelForCausalLM.from_pretrained("Fan21/git_20")
17
+ processor = AutoProcessor.from_pretrained("Fan21/git_20")
18
+
19
+ image_path ='Please enter the image address here'
20
+ image = Image.open(image_path)
21
+ width, height = image.size
22
+ display(image.resize((int(1 * width), int(1 * height))))
23
+ pixel_values = processor(images=image, return_tensors="pt").pixel_values
24
+ with torch.no_grad():
25
+ outputs = model.generate(pixel_values=pixel_values, max_length=50)
26
+
27
+ answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
28
+ ```