Upload deepseek-ai_DeepSeek-OCR_1.py with huggingface_hub
Browse files3 unmodified lines456789101111 unmodified lines232425242627282910 unmodified lines40414241434445463 unmodified lines# "numpy",# "einops",# "pandas",# "matplotlib",# "paddleorc",# "protobuf",# "torch",# "sentencepiece",11 unmodified linestry: # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("deepseek-ai/DeepSeek-OCR", trust_remote_code=True, torch_dtype="auto") model = AutoModel.from_pretrained("deepseek-ai/DeepSeek-OCR", trust_remote_code=True, dtype="auto") with open('deepseek-ai_DeepSeek-OCR_1.txt', 'w', encoding='utf-8') as f: f.write('Everything was good in deepseek-ai_DeepSeek-OCR_1.txt')except Exception as e:10 unmodified lines f.write('''```CODE: # Load model directlyfrom transformers import AutoModelmodel = AutoModel.from_pretrained("deepseek-ai/DeepSeek-OCR", trust_remote_code=True, torch_dtype="auto")model = AutoModel.from_pretrained("deepseek-ai/DeepSeek-OCR", trust_remote_code=True, dtype="auto")```
ERROR: deepseek-ai_DeepSeek-OCR_1.py+4-2