paulcalzada commited on
Commit
913dcda
·
verified ·
1 Parent(s): e143b97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -95,26 +95,20 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
95
  def generate_only(
96
  spec, use_rag, top_k, model_choice, api_key, temperature, top_p, max_new_tokens
97
  ):
98
- # The run_generation function returns three values, but we only want the first one.
99
  verilog_code, _, _ = run_generation(
100
  spec, use_rag, top_k, model_choice, api_key, temperature, top_p, max_new_tokens
101
  )
102
  return verilog_code
 
 
 
 
103
 
104
  # --- Event listeners for the UI ---
105
  toggle_btn.click(
106
- fn=None,
107
- inputs=None,
108
- outputs=settings_column,
109
- js="""
110
- (e) => {
111
- const column = document.getElementById(e.target.dataset.targetId);
112
- if (column) {
113
- column.style.display = column.style.display === 'none' ? 'flex' : 'none';
114
- }
115
- }
116
- """,
117
- _js_metadata={"targetId": "settings_column"}
118
  )
119
 
120
  def copy_to_clipboard_fn(text):
 
95
  def generate_only(
96
  spec, use_rag, top_k, model_choice, api_key, temperature, top_p, max_new_tokens
97
  ):
 
98
  verilog_code, _, _ = run_generation(
99
  spec, use_rag, top_k, model_choice, api_key, temperature, top_p, max_new_tokens
100
  )
101
  return verilog_code
102
+
103
+ # --- Function to toggle the visibility of the settings column ---
104
+ def toggle_visibility(visible):
105
+ return not visible
106
 
107
  # --- Event listeners for the UI ---
108
  toggle_btn.click(
109
+ fn=toggle_visibility,
110
+ inputs=[settings_column],
111
+ outputs=[settings_column]
 
 
 
 
 
 
 
 
 
112
  )
113
 
114
  def copy_to_clipboard_fn(text):