stpete2 commited on
Commit
ddb86c5
Β·
verified Β·
1 Parent(s): c207796

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -124,4 +124,20 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
124
  )
125
 
126
  if __name__ == "__main__":
127
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  )
125
 
126
  if __name__ == "__main__":
127
+ demo.launch()
128
+ γγ‚Œγ§γ‚‚γ‚¨γƒ©γƒΌγŒηΆšγε ΄εˆγ―γ€γƒͺビジョンγͺγ—γ§ζœ€ζ–°η‰ˆγ‚’θ©¦γ—γ¦γΏγ¦γγ γ•γ„:
129
+ pythonMODEL_ID = "vikhyatk/moondream2"
130
+ REVISION = None # ζœ€ζ–°η‰ˆγ‚’δ½Ώη”¨
131
+
132
+ tokenizer = AutoTokenizer.from_pretrained(
133
+ MODEL_ID,
134
+ trust_remote_code=True
135
+ )
136
+
137
+ model = AutoModelForCausalLM.from_pretrained(
138
+ MODEL_ID,
139
+ trust_remote_code=True,
140
+ torch_dtype=torch.float32,
141
+ low_cpu_mem_usage=True
142
+ ).to(DEVICE)
143
+