Abbeite commited on
Commit
135c8a1
1 Parent(s): 6a44c25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,7 +19,7 @@ model, tokenizer = load_model()
19
  # Function to generate text with the model
20
  def generate_text(prompt):
21
  formatted_prompt = f"[INST] {prompt} [/INST]" # Format the prompt according to your specification
22
- pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=500)
23
  result = pipe(formatted_prompt)
24
  return result[0]['generated_text']
25
 
 
19
  # Function to generate text with the model
20
  def generate_text(prompt):
21
  formatted_prompt = f"[INST] {prompt} [/INST]" # Format the prompt according to your specification
22
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_length=300)
23
  result = pipe(formatted_prompt)
24
  return result[0]['generated_text']
25