Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,6 @@ with gr.Blocks() as demo:
|
|
| 8 |
with gr.Row():
|
| 9 |
_, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
|
| 10 |
with colum_2:
|
| 11 |
-
gr.Markdown(value=description)
|
| 12 |
code = gr.Textbox(lines=5, label="Input code", value="def all_odd_elements(sequence):\n \"\"\"Returns every odd element of the sequence.\"\"\"")
|
| 13 |
|
| 14 |
with gr.Accordion("Advanced settings", open=False):
|
|
@@ -33,8 +32,7 @@ with gr.Blocks() as demo:
|
|
| 33 |
label="Random seed to use for the generation"
|
| 34 |
)
|
| 35 |
run = gr.Button()
|
| 36 |
-
output = gr.HTML(label="Generated code")
|
| 37 |
|
| 38 |
-
event = run.click(code_generation, [code, max_new_tokens, temperature, seed],
|
| 39 |
|
| 40 |
demo.launch()
|
|
|
|
| 8 |
with gr.Row():
|
| 9 |
_, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
|
| 10 |
with colum_2:
|
|
|
|
| 11 |
code = gr.Textbox(lines=5, label="Input code", value="def all_odd_elements(sequence):\n \"\"\"Returns every odd element of the sequence.\"\"\"")
|
| 12 |
|
| 13 |
with gr.Accordion("Advanced settings", open=False):
|
|
|
|
| 32 |
label="Random seed to use for the generation"
|
| 33 |
)
|
| 34 |
run = gr.Button()
|
|
|
|
| 35 |
|
| 36 |
+
event = run.click(code_generation, [code, max_new_tokens, temperature, seed], code, api_name="predict")
|
| 37 |
|
| 38 |
demo.launch()
|