Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,17 +15,15 @@ model = AutoModelForSeq2SeqLM.from_pretrained(
|
|
| 15 |
# zephyr
|
| 16 |
# pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-alpha",torch_dtype=torch.bfloat16, device_map="auto")
|
| 17 |
|
| 18 |
-
def
|
| 19 |
-
top_p = float(top_p)
|
| 20 |
-
|
| 21 |
prompt = inputuno
|
| 22 |
promptdos = inputdos
|
| 23 |
|
| 24 |
generate_kwargs = dict(
|
| 25 |
-
temperature=
|
| 26 |
-
max_new_tokens=
|
| 27 |
-
top_p=
|
| 28 |
-
repetition_penalty=
|
| 29 |
do_sample=True,
|
| 30 |
seed=42,
|
| 31 |
)
|
|
@@ -64,6 +62,6 @@ examples = [["photographer"], ["developer"], ["teacher"], [
|
|
| 64 |
"human resources staff"], ["recipe for ham croquettes"]]
|
| 65 |
description = ""
|
| 66 |
|
| 67 |
-
PerfectGPT = gr.Interface(
|
| 68 |
|
| 69 |
PerfectGPT.launch()
|
|
|
|
| 15 |
# zephyr
|
| 16 |
# pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-alpha",torch_dtype=torch.bfloat16, device_map="auto")
|
| 17 |
|
| 18 |
+
def generateZep(inputuno, inputdos):
|
|
|
|
|
|
|
| 19 |
prompt = inputuno
|
| 20 |
promptdos = inputdos
|
| 21 |
|
| 22 |
generate_kwargs = dict(
|
| 23 |
+
temperature=0.9,
|
| 24 |
+
max_new_tokens=3556,
|
| 25 |
+
top_p=float(0.95),
|
| 26 |
+
repetition_penalty=1.0,
|
| 27 |
do_sample=True,
|
| 28 |
seed=42,
|
| 29 |
)
|
|
|
|
| 62 |
"human resources staff"], ["recipe for ham croquettes"]]
|
| 63 |
description = ""
|
| 64 |
|
| 65 |
+
PerfectGPT = gr.Interface(fn=generateZep, inputs=[input_prompt, input_promptdos], outputs=output_component, examples=examples, title="๐ฟ PerfectGPT v1 ๐ฟ", description=description)
|
| 66 |
|
| 67 |
PerfectGPT.launch()
|