paulcalzada commited on
Commit
c14cd0b
·
1 Parent(s): ed9539d

changed gpt-5 to gpt-5-chat-latest, moved api key to top and included message to show api key is not saved

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -180,7 +180,6 @@ def ensure_index_downloaded() -> Path:
180
  local_dir_use_symlinks=False,
181
  )
182
 
183
- # --- START OF FIX ---
184
  # Walk the downloaded directory to find the index files
185
  downloaded_dir = Path(snapshot_path)
186
  for root, dirs, files in os.walk(downloaded_dir):
@@ -191,7 +190,6 @@ def ensure_index_downloaded() -> Path:
191
 
192
  # If the files are not found, raise an error
193
  raise FileNotFoundError("FAISS index files (index.faiss and index.pkl) not found in the downloaded dataset.")
194
- # --- END OF FIX ---
195
 
196
 
197
  # Keep a lightweight global cache so we don’t reload embeddings on every click
@@ -254,22 +252,14 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)") as demo:
254
 
255
  with gr.Row():
256
  with gr.Column(scale=2):
257
- spec = gr.Textbox(
258
- label="Design Specification (natural language or I/O contract)",
259
- placeholder="e.g., 8-bit UART transmitter with baud rate generator ...",
260
- lines=10
261
- )
262
- with gr.Row():
263
- use_rag = gr.Checkbox(value=True, label="Use Retrieval (RAG)")
264
- top_k = gr.Slider(1, 10, value=3, step=1, label="Top-K retrieved examples")
265
-
266
  with gr.Row():
267
  model_choice = gr.Dropdown(
268
  choices=[
269
  "gpt-4o",
270
  "gpt-4o-mini",
271
  "gpt-4.1",
272
- "gpt-5",
273
  "gpt-5-mini"
274
  ],
275
  value="gpt-4o",
@@ -277,6 +267,15 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)") as demo:
277
  )
278
  api_key = gr.Textbox(label="OpenAI API Key", type="password", placeholder="sk-...")
279
 
 
 
 
 
 
 
 
 
 
280
  with gr.Accordion("Generation Settings", open=False):
281
  temperature = gr.Slider(0.0, 1.5, value=0.2, step=0.05, label="Temperature")
282
  top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")
 
180
  local_dir_use_symlinks=False,
181
  )
182
 
 
183
  # Walk the downloaded directory to find the index files
184
  downloaded_dir = Path(snapshot_path)
185
  for root, dirs, files in os.walk(downloaded_dir):
 
190
 
191
  # If the files are not found, raise an error
192
  raise FileNotFoundError("FAISS index files (index.faiss and index.pkl) not found in the downloaded dataset.")
 
193
 
194
 
195
  # Keep a lightweight global cache so we don’t reload embeddings on every click
 
252
 
253
  with gr.Row():
254
  with gr.Column(scale=2):
255
+ # Moved model choice and API key to the top of the left column
 
 
 
 
 
 
 
 
256
  with gr.Row():
257
  model_choice = gr.Dropdown(
258
  choices=[
259
  "gpt-4o",
260
  "gpt-4o-mini",
261
  "gpt-4.1",
262
+ "gpt-5-chat-latest",
263
  "gpt-5-mini"
264
  ],
265
  value="gpt-4o",
 
267
  )
268
  api_key = gr.Textbox(label="OpenAI API Key", type="password", placeholder="sk-...")
269
 
270
+ spec = gr.Textbox(
271
+ label="Design Specification (natural language or I/O contract)",
272
+ placeholder="e.g., 8-bit UART transmitter with baud rate generator ...",
273
+ lines=10
274
+ )
275
+ with gr.Row():
276
+ use_rag = gr.Checkbox(value=True, label="Use Retrieval (RAG)")
277
+ top_k = gr.Slider(1, 10, value=3, step=1, label="Top-K retrieved examples")
278
+
279
  with gr.Accordion("Generation Settings", open=False):
280
  temperature = gr.Slider(0.0, 1.5, value=0.2, step=0.05, label="Temperature")
281
  top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")