Spaces:
Runtime error
Runtime error
Update app.py
Browse files5 unmodified lines67891011121324 unmodified lines3839404142434445464748495051525354555 unmodified linesimport osfrom threading import ThreadHF_TOKEN = os.environ.get("HF_TOKEN", None)MODEL_ID = "Nechba/Coin-Generative-Recognition"TITLE = f'<br><center>π Coin Generative Recognition</a></center>'24 unmodified linesmax-height: 300px; /* Limit the height of images */}"""import os# Directory where the model and tokenizer will be saved# Load model directlyfrom transformers import AutoModelmodel = AutoModel.from_pretrained("Nechba/Coin-Generative-Recognition", trust_remote_code=True).to(0)# model = AutoModelForCausalLM.from_pretrained(# MODEL_ID,# torch_dtype=torch.bfloat16,# low_cpu_mem_usage=True,# trust_remote_code=True# ).to(0)tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)model.eval()5 unmodified lines678910111224 unmodified lines3738394041424344454647484950515 unmodified linesimport osfrom threading import ThreadMODEL_ID = "THUDM/glm-4v-9b"TITLE = f'<br><center>π Coin Generative Recognition</a></center>'24 unmodified linesmax-height: 300px; /* Limit the height of images */}"""# Load model directlymodel = AutoModelForCausalLM.from_pretrained(MODEL_ID,torch_dtype=torch.bfloat16,low_cpu_mem_usage=True,trust_remote_code=True).to(0)tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)model.eval()
app.py+8-12