Spaces:
Running
Running
AjithBharadwaj
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -8,7 +8,7 @@ quants = BitsAndBytesConfig(load_in_4bit=True)
|
|
8 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_id,quantization_config=quants)
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_id,quantization_config=quants)
|
11 |
-
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
12 |
hf = HuggingFacePipeline(pipeline=pipe)
|
13 |
|
14 |
def generate_blog(role , words , topic):
|
|
|
8 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_id,quantization_config=quants)
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_id,quantization_config=quants)
|
11 |
+
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer,max_new_tokens=1000)
|
12 |
hf = HuggingFacePipeline(pipeline=pipe)
|
13 |
|
14 |
def generate_blog(role , words , topic):
|