lvwerra HF staff commited on
Commit
7729daa
·
verified ·
1 Parent(s): 7eb873e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -26
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
- with gr.Row():
91
- user_input = gr.Textbox(value="Solve the Lotka-Volterra equation and plot the results.", lines=3)
92
- with gr.Row():
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
- with gr.Row():
98
- with gr.Accordion("Advanced Settings", open=False):
99
- system_input = gr.Textbox(
100
- label="System Prompt",
101
- value=DEFAULT_SYSTEM_PROMPT,
102
- elem_classes="input-box",
103
- lines=8
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  )
105
- with gr.Row():
106
- max_tokens = gr.Number(
107
- label="Max New Tokens",
108
- value=DEFAULT_MAX_TOKENS,
109
- minimum=128,
110
- maximum=2048,
111
- step=8,
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,