imperiusrex commited on
Commit
8717979
·
verified ·
1 Parent(s): 0c3e359

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
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 = "your_username/my-handwritten-trocr-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}")
 
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}")