Spaces:
Sleeping
Sleeping
import gradio as gr | |
def code_block(code): | |
# Add your code logic here | |
# This function will be called when the submit button is clicked | |
pass | |
code_input = gr.inputs.Code(label="Enter your code here") | |
submit_button = gr.outputs.Button(label="Submit") | |
options = [ | |
gr.outputs.Accordion([ | |
gr.outputs.Checkbox(label="Option 1"), | |
gr.outputs.Checkbox(label="Option 2"), | |
gr.outputs.Checkbox(label="Option 3") | |
], label="Options") | |
] | |
# COnvert this to gr.Blocks() | |
with gr.Blocks() as apps: | |
with gr.Row(): | |
mdn = gr.Markdown("## StarCoder 15b Instruct\n\n---\n\n") | |
with gr.Row(): | |
code = gr.Code("// Enter some Javascript here to interact with StarCoder.\n\nconsole.log(\"StarCoder says") | |
with gr.Row(): | |
btn = gr.Button("Complete with StarCoder") | |
btn.click(code_block, inputs=[code, mdn], outputs=[code, mdn]) | |
apps.launch(share=False, debug=True) |