Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,37 +86,42 @@ css = """
|
|
86 |
# Create the interface
|
87 |
with gr.Blocks(css=css) as demo:
|
88 |
state = gr.State(value=[])
|
|
|
89 |
html_output = gr.HTML(value=update_notebook_display(create_base_notebook([])[0]))
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
files = gr.File(label="Upload files to use", file_count="multiple")
|
94 |
with gr.Row():
|
95 |
generate_btn = gr.Button("Let's go!")
|
96 |
clear_btn = gr.Button("Clear")
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
)
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
interactive=True
|
113 |
-
)
|
114 |
-
|
115 |
-
model = gr.Dropdown(choices=[
|
116 |
-
"meta-llama/Llama-3.2-3B-Instruct",
|
117 |
-
"meta-llama/Llama-3.1-8B-Instruct",
|
118 |
-
"meta-llama/Llama-3.1-70B-Instruct"]
|
119 |
-
)
|
120 |
|
121 |
generate_btn.click(
|
122 |
fn=execute_jupyter_agent,
|
|
|
86 |
# Create the interface
|
87 |
with gr.Blocks(css=css) as demo:
|
88 |
state = gr.State(value=[])
|
89 |
+
|
90 |
html_output = gr.HTML(value=update_notebook_display(create_base_notebook([])[0]))
|
91 |
+
|
92 |
+
user_input = gr.Textbox(value="Solve the Lotka-Volterra equation and plot the results.", lines=3)
|
93 |
+
|
|
|
94 |
with gr.Row():
|
95 |
generate_btn = gr.Button("Let's go!")
|
96 |
clear_btn = gr.Button("Clear")
|
97 |
+
|
98 |
+
with gr.Accordion("Upload files", open=False:)
|
99 |
+
files = gr.File(label="Upload files to use", file_count="multiple")
|
100 |
+
|
101 |
+
|
102 |
+
with gr.Accordion("Advanced Settings", open=False):
|
103 |
+
system_input = gr.Textbox(
|
104 |
+
label="System Prompt",
|
105 |
+
value=DEFAULT_SYSTEM_PROMPT,
|
106 |
+
elem_classes="input-box",
|
107 |
+
lines=8
|
108 |
+
)
|
109 |
+
with gr.Row():
|
110 |
+
max_tokens = gr.Number(
|
111 |
+
label="Max New Tokens",
|
112 |
+
value=DEFAULT_MAX_TOKENS,
|
113 |
+
minimum=128,
|
114 |
+
maximum=2048,
|
115 |
+
step=8,
|
116 |
+
interactive=True
|
117 |
)
|
118 |
+
|
119 |
+
model = gr.Dropdown(value="meta-llama/Llama-3.1-8B-Instruct",
|
120 |
+
choices=[
|
121 |
+
"meta-llama/Llama-3.2-3B-Instruct",
|
122 |
+
"meta-llama/Llama-3.1-8B-Instruct",
|
123 |
+
"meta-llama/Llama-3.1-70B-Instruct"]
|
124 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
generate_btn.click(
|
127 |
fn=execute_jupyter_agent,
|