Spaces:
Sleeping
Sleeping
test2
Browse files
app.py
CHANGED
|
@@ -1,11 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import AutoModel, AutoTokenizer
|
| 3 |
|
| 4 |
-
device = "cpu"
|
| 5 |
-
|
| 6 |
# Load the model
|
| 7 |
model = AutoModel.from_pretrained("openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)
|
| 8 |
-
model = model.to(device=device)
|
| 9 |
|
| 10 |
# Load the tokenizer
|
| 11 |
tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import AutoModel, AutoTokenizer
|
| 3 |
|
|
|
|
|
|
|
| 4 |
# Load the model
|
| 5 |
model = AutoModel.from_pretrained("openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)
|
|
|
|
| 6 |
|
| 7 |
# Load the tokenizer
|
| 8 |
tokenizer = AutoTokenizer.from_pretrained("openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)
|