Nechba commited on
Commit
67eb48f
β€’
1 Parent(s): 1d79035

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -41,13 +41,15 @@ img {
41
  import os
42
  # Directory where the model and tokenizer will be saved
43
 
44
-
45
- model = AutoModelForCausalLM.from_pretrained(
46
- MODEL_ID,
47
- torch_dtype=torch.bfloat16,
48
- low_cpu_mem_usage=True,
49
- trust_remote_code=True
50
- ).to(0)
 
 
51
 
52
  tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
53
  model.eval()
 
41
  import os
42
  # Directory where the model and tokenizer will be saved
43
 
44
+ # Load model directly
45
+ from transformers import AutoModel
46
+ model = AutoModel.from_pretrained("Nechba/Coin-Generative-Recognition", trust_remote_code=True).to(0)
47
+ # model = AutoModelForCausalLM.from_pretrained(
48
+ # MODEL_ID,
49
+ # torch_dtype=torch.bfloat16,
50
+ # low_cpu_mem_usage=True,
51
+ # trust_remote_code=True
52
+ # ).to(0)
53
 
54
  tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
55
  model.eval()