Delete app.py
Browse files
app.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 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}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|