Skip to content

Commit

Permalink
Fix transformers dependencies for slim.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinHuSh committed Dec 9, 2024
1 parent 215e936 commit 6ce8e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag/llm/cv_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from io import BytesIO
import json
import requests
from transformers import GenerationConfig

from rag.nlp import is_english
from api.utils import get_uuid
Expand Down Expand Up @@ -510,6 +509,7 @@ def describe(self, image, max_tokens=2048):
return res.text,res.usage_metadata.total_token_count

def chat(self, system, history, gen_conf, image=""):
from transformers import GenerationConfig
if system:
history[-1]["content"] = system + history[-1]["content"] + "user query: " + history[-1]["content"]
try:
Expand Down

0 comments on commit 6ce8e43

Please sign in to comment.