[Python] Why does this say TypeError: 'module' object is not callable [closed]

Discussão em 'Python' iniciado por Stack, Abril 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to run this and it keeps giving me this error this is the code

    tokenizer_b = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
    model_b = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
    print("got model and tokenizer")

    hf_pipline_vivaan = pipeline("text2text-generation", model = model_b, tokenizer=tokenizer_b, max_new_tokens=500, do_sample=True)

    llm = huggingface_pipeline(pipline=hf_pipline_vivaan)


    this is the error

    File "c:\Users\Vivaan Singh\Documents\olen_chatbot\cli.py", line 34, in <module>
    llm = huggingface_pipeline(pipline=hf_pipline_vivaan)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: 'module' object is not callable

    Continue reading...

Compartilhe esta Página