Update app.py
Browse files
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=
|
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 |
|