mgbam commited on
Commit
2b7b386
Β·
verified Β·
1 Parent(s): 6e5998c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -163,16 +163,12 @@ with gr.Blocks(theme=gr.themes.Soft(), title="AnyCoder - AI Code Generator") as
163
  gr.Markdown("## πŸš€ AnyCoder AI")
164
  gr.Markdown("Your personal AI partner for generating, modifying, and understanding code.")
165
 
166
- # Group models by category for a better user experience
167
- model_choices = {}
168
- for model in AVAILABLE_MODELS:
169
- category = model.get("category", "Other")
170
- if category not in model_choices:
171
- model_choices[category] = []
172
- model_choices[category].append(model["name"])
173
 
174
  model_dd = gr.Dropdown(
175
- choices=list(model_choices.values()),
176
  value=initial_model["name"],
177
  label="πŸ€– Select AI Model",
178
  info="Different models have different strengths. Experiment!"
 
163
  gr.Markdown("## πŸš€ AnyCoder AI")
164
  gr.Markdown("Your personal AI partner for generating, modifying, and understanding code.")
165
 
166
+ # Create a flat list of model names for the dropdown.
167
+ # The grouped choices format was causing a ValueError with the current setup.
168
+ model_choices = [model["name"] for model in AVAILABLE_MODELS]
 
 
 
 
169
 
170
  model_dd = gr.Dropdown(
171
+ choices=model_choices,
172
  value=initial_model["name"],
173
  label="πŸ€– Select AI Model",
174
  info="Different models have different strengths. Experiment!"