Chegue100 commited on
Commit
0ceac07
·
verified ·
1 Parent(s): b2e8865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
5
  tokenizer = AutoTokenizer.from_pretrained("sambanovasystems/SambaLingo-Hungarian-Chat", use_fast=False)
6
  model = AutoModelForCausalLM.from_pretrained("sambanovasystems/SambaLingo-Hungarian-Chat", device_map="auto", torch_dtype="auto")
7
 
8
- # Create the pipeline
9
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map="auto", use_fast=False)
10
 
11
  # Define the chat function
12
  def chat(question):
 
5
  tokenizer = AutoTokenizer.from_pretrained("sambanovasystems/SambaLingo-Hungarian-Chat", use_fast=False)
6
  model = AutoModelForCausalLM.from_pretrained("sambanovasystems/SambaLingo-Hungarian-Chat", device_map="auto", torch_dtype="auto")
7
 
8
+ # Create the pipeline with max_new_tokens parameter
9
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map="auto", use_fast=False, max_length=1024)
10
 
11
  # Define the chat function
12
  def chat(question):