Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,10 @@ import gradio as gr
|
|
| 7 |
torch.manual_seed(100)
|
| 8 |
|
| 9 |
# Carregar o modelo e o tokenizer
|
| 10 |
-
model = AutoModel.from_pretrained('openbmb/MiniCPM-V
|
| 11 |
attn_implementation='sdpa', torch_dtype=torch.bfloat16)
|
| 12 |
model = model.eval().cuda()
|
| 13 |
-
tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V
|
| 14 |
|
| 15 |
# FunΓ§Γ£o para interagir com o modelo
|
| 16 |
def chat_with_model(image, question, chat_history=None):
|
|
|
|
| 7 |
torch.manual_seed(100)
|
| 8 |
|
| 9 |
# Carregar o modelo e o tokenizer
|
| 10 |
+
model = AutoModel.from_pretrained('openbmb/MiniCPM-V-2_6-gguf', trust_remote_code=True,
|
| 11 |
attn_implementation='sdpa', torch_dtype=torch.bfloat16)
|
| 12 |
model = model.eval().cuda()
|
| 13 |
+
tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-2_6-gguf', trust_remote_code=True)
|
| 14 |
|
| 15 |
# FunΓ§Γ£o para interagir com o modelo
|
| 16 |
def chat_with_model(image, question, chat_history=None):
|