Update README.md
#1
by
Albert1127
- opened
README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Nougat for formula
|
| 2 |
|
| 3 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
@@ -47,7 +59,7 @@ Nougat for formula may be useful when developing tools or apps aiming at generat
|
|
| 47 |
|
| 48 |
Demo below shows how to input an image into the model and generate Latex/Markdown formula code.
|
| 49 |
|
| 50 |
-
```
|
| 51 |
from transformers import NougatProcessor, VisionEncoderDecoderModel
|
| 52 |
from PIL import Image
|
| 53 |
|
|
@@ -121,64 +133,7 @@ The BLEU is 0.8157 and CER is 0.1601 on test data.
|
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
-
## Environmental Impact
|
| 125 |
-
|
| 126 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 127 |
-
|
| 128 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 129 |
-
|
| 130 |
-
- **Hardware Type:** [More Information Needed]
|
| 131 |
-
- **Hours used:** [More Information Needed]
|
| 132 |
-
- **Cloud Provider:** [More Information Needed]
|
| 133 |
-
- **Compute Region:** [More Information Needed]
|
| 134 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 135 |
-
|
| 136 |
-
## Technical Specifications [optional]
|
| 137 |
-
|
| 138 |
-
### Model Architecture and Objective
|
| 139 |
-
|
| 140 |
-
[More Information Needed]
|
| 141 |
-
|
| 142 |
-
### Compute Infrastructure
|
| 143 |
-
|
| 144 |
-
[More Information Needed]
|
| 145 |
-
|
| 146 |
-
#### Hardware
|
| 147 |
-
|
| 148 |
-
[More Information Needed]
|
| 149 |
-
|
| 150 |
-
#### Software
|
| 151 |
-
|
| 152 |
-
[More Information Needed]
|
| 153 |
-
|
| 154 |
-
## Citation [optional]
|
| 155 |
-
|
| 156 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 157 |
-
|
| 158 |
-
**BibTeX:**
|
| 159 |
-
|
| 160 |
-
[More Information Needed]
|
| 161 |
-
|
| 162 |
-
**APA:**
|
| 163 |
-
|
| 164 |
-
[More Information Needed]
|
| 165 |
-
|
| 166 |
-
## Glossary [optional]
|
| 167 |
-
|
| 168 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 169 |
-
|
| 170 |
-
[More Information Needed]
|
| 171 |
-
|
| 172 |
-
## More Information [optional]
|
| 173 |
-
|
| 174 |
-
[More Information Needed]
|
| 175 |
-
|
| 176 |
-
## Model Card Authors [optional]
|
| 177 |
-
|
| 178 |
-
[More Information Needed]
|
| 179 |
|
| 180 |
-
## Model Card Contact
|
| 181 |
|
| 182 |
-
[More Information Needed]
|
| 183 |
|
| 184 |
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- yuntian-deng/im2latex-100k
|
| 5 |
+
metrics:
|
| 6 |
+
- bleu
|
| 7 |
+
- cer
|
| 8 |
+
pipeline_tag: image-to-text
|
| 9 |
+
tags:
|
| 10 |
+
- vision
|
| 11 |
+
- nougat
|
| 12 |
+
---
|
| 13 |
# Nougat for formula
|
| 14 |
|
| 15 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
|
|
| 59 |
|
| 60 |
Demo below shows how to input an image into the model and generate Latex/Markdown formula code.
|
| 61 |
|
| 62 |
+
``` python
|
| 63 |
from transformers import NougatProcessor, VisionEncoderDecoderModel
|
| 64 |
from PIL import Image
|
| 65 |
|
|
|
|
| 133 |
|
| 134 |
|
| 135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
|
|
|
|
| 137 |
|
|
|
|
| 138 |
|
| 139 |
|