Skip to content

Commit

Permalink
Update huggingface.py add import torch statement
Browse files Browse the repository at this point in the history
Added import torch statement
  • Loading branch information
Archit-Kohli authored Oct 5, 2023
1 parent 5b4e517 commit 7ce1dc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/llm/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def __init__(self, api_key, llm_name='Arc53/DocsGPT-7B',q=False):

from langchain.llms import HuggingFacePipeline
if q:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, BitsAndBytesConfig
tokenizer = AutoTokenizer.from_pretrained(llm_name)
bnb_config = BitsAndBytesConfig(

Check warning on line 13 in application/llm/huggingface.py

View check run for this annotation

Codecov / codecov/patch

application/llm/huggingface.py#L9-L13

Added lines #L9 - L13 were not covered by tests
Expand Down

0 comments on commit 7ce1dc9

Please sign in to comment.