Spaces:
Running
Running
Set few-shot parameters
Browse files
app.py
CHANGED
@@ -67,10 +67,10 @@ def pass_to_input(generated_gl):
|
|
67 |
None,
|
68 |
)
|
69 |
|
70 |
-
def fewshot_prompt_parameters(
|
71 |
return (
|
72 |
-
|
73 |
-
|
74 |
)
|
75 |
|
76 |
def gradio_app():
|
@@ -129,7 +129,8 @@ def gradio_app():
|
|
129 |
examples = few_shot_prompts_examples,
|
130 |
inputs = [text_gl],
|
131 |
outputs = [max_length, repetition_penalty],
|
132 |
-
fn =fewshot_prompt_parameters
|
|
|
133 |
)
|
134 |
|
135 |
demo.launch()
|
|
|
67 |
None,
|
68 |
)
|
69 |
|
70 |
+
def fewshot_prompt_parameters():
|
71 |
return (
|
72 |
+
gr.update(value=20), # max_length
|
73 |
+
gr.update(value=1) # repetition_penalty
|
74 |
)
|
75 |
|
76 |
def gradio_app():
|
|
|
129 |
examples = few_shot_prompts_examples,
|
130 |
inputs = [text_gl],
|
131 |
outputs = [max_length, repetition_penalty],
|
132 |
+
fn =fewshot_prompt_parameters,
|
133 |
+
run_on_click = True
|
134 |
)
|
135 |
|
136 |
demo.launch()
|