Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
11 |
|
12 |
# Create HF pipeline
|
13 |
-
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=
|
14 |
|
15 |
# Wrap with HuggingFacePipeline for LangChain
|
16 |
llm = HuggingFacePipeline(pipeline=pipe)
|
|
|
10 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
11 |
|
12 |
# Create HF pipeline
|
13 |
+
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=10000, do_sample=True)
|
14 |
|
15 |
# Wrap with HuggingFacePipeline for LangChain
|
16 |
llm = HuggingFacePipeline(pipeline=pipe)
|