Spaces:
Running
on
T4
Running
on
T4
Use new Gradio Code block (#11)
Browse files- Use new Gradio Code block (25012eba9e67e2e48b3fe44396cfcb365a6037ef)
- use gr.Code block (a3ad754ae087f1078a2a961ffa5da65dc70f6e94)
Co-authored-by: loubna ben allal <[email protected]>
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.21.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
CHANGED
@@ -97,7 +97,7 @@ with demo:
|
|
97 |
_, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
|
98 |
with colum_2:
|
99 |
gr.Markdown(value=description)
|
100 |
-
code = gr.
|
101 |
|
102 |
with gr.Accordion("Advanced settings", open=False):
|
103 |
max_new_tokens= gr.Slider(
|
|
|
97 |
_, colum_2, _ = gr.Column(scale=1), gr.Column(scale=6), gr.Column(scale=1)
|
98 |
with colum_2:
|
99 |
gr.Markdown(value=description)
|
100 |
+
code = gr.Code(lines=5, language="python", label="Input code", value="def all_odd_elements(sequence):\n \"\"\"Returns every odd element of the sequence.\"\"\"")
|
101 |
|
102 |
with gr.Accordion("Advanced settings", open=False):
|
103 |
max_new_tokens= gr.Slider(
|