Update app.py
Browse files
app.py
CHANGED
|
@@ -31,13 +31,13 @@ tokenizer.pad_token = tokenizer.eos_token
|
|
| 31 |
def inference(prompt, count):
|
| 32 |
count = int(count)
|
| 33 |
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
|
| 34 |
-
result = pipe(f"
|
| 35 |
out_text = result[0]['generated_text']
|
| 36 |
return out_text
|
| 37 |
|
| 38 |
title = "TSAI S21 Assignment: Adaptive QLoRA training on open assist oasst1 dataset, using microsoft/phi2 model"
|
| 39 |
description = "A simple Gradio interface that accepts a context and generates GPT like text "
|
| 40 |
-
examples = [["What is a large language model?","
|
| 41 |
]
|
| 42 |
|
| 43 |
|
|
|
|
| 31 |
def inference(prompt, count):
|
| 32 |
count = int(count)
|
| 33 |
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
|
| 34 |
+
result = pipe(f"{prompt}",max_new_tokens=count)
|
| 35 |
out_text = result[0]['generated_text']
|
| 36 |
return out_text
|
| 37 |
|
| 38 |
title = "TSAI S21 Assignment: Adaptive QLoRA training on open assist oasst1 dataset, using microsoft/phi2 model"
|
| 39 |
description = "A simple Gradio interface that accepts a context and generates GPT like text "
|
| 40 |
+
examples = [["What is a large language model?","50"]
|
| 41 |
]
|
| 42 |
|
| 43 |
|