Update app.py
Browse files
app.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
-
import torch
|
| 2 |
-
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
| 3 |
-
from huggingface_hub import notebook_login # Used in Colab for easy login
|
| 4 |
-
|
| 5 |
-
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
| 6 |
-
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-large-handwritten")
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
notebook_login()
|
| 10 |
-
|
| 11 |
-
model_repo_id = "
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
model.push_to_hub(model_repo_id)
|
| 15 |
-
processor.push_to_hub(model_repo_id)
|
| 16 |
-
|
| 17 |
print(f"Your TrOCR model and processor are now available on the Hugging Face Hub at: https://huggingface.co/{model_repo_id}")
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
| 3 |
+
from huggingface_hub import notebook_login # Used in Colab for easy login
|
| 4 |
+
|
| 5 |
+
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
| 6 |
+
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-large-handwritten")
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
notebook_login()
|
| 10 |
+
|
| 11 |
+
model_repo_id = "imperiusrex/Handwritten-model"
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
model.push_to_hub(model_repo_id)
|
| 15 |
+
processor.push_to_hub(model_repo_id)
|
| 16 |
+
|
| 17 |
print(f"Your TrOCR model and processor are now available on the Hugging Face Hub at: https://huggingface.co/{model_repo_id}")
|