marks
commited on
Commit
·
766302d
1
Parent(s):
8e0a4a4
Explictly stating values
Browse files
app.py
CHANGED
|
@@ -57,15 +57,17 @@ class PodcasterUI:
|
|
| 57 |
with gr.Column():
|
| 58 |
openrouter_model = gr.Dropdown(
|
| 59 |
label='AI Model',
|
| 60 |
-
choices=self.models,
|
| 61 |
-
value=self.models[0][0] if len(self.models) > 1 else None
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
with gr.Column():
|
| 65 |
voice_model = gr.Dropdown(
|
| 66 |
label='Voice',
|
| 67 |
-
choices=self.voices,
|
| 68 |
-
value=self.voices[0][0] if len(self.voices) > 1 else None
|
|
|
|
| 69 |
)
|
| 70 |
|
| 71 |
submit_btn = gr.Button('Generate Podcast', variant='primary')
|
|
|
|
| 57 |
with gr.Column():
|
| 58 |
openrouter_model = gr.Dropdown(
|
| 59 |
label='AI Model',
|
| 60 |
+
choices=self.models, # Already in (id, name) format
|
| 61 |
+
value=self.models[0][0] if len(self.models) > 1 else None,
|
| 62 |
+
type="value" # Ensures value (id) is used internally
|
| 63 |
)
|
| 64 |
|
| 65 |
with gr.Column():
|
| 66 |
voice_model = gr.Dropdown(
|
| 67 |
label='Voice',
|
| 68 |
+
choices=self.voices, # Already in (id, name) format
|
| 69 |
+
value=self.voices[0][0] if len(self.voices) > 1 else None,
|
| 70 |
+
type="value" # Ensures value (id) is used internally
|
| 71 |
)
|
| 72 |
|
| 73 |
submit_btn = gr.Button('Generate Podcast', variant='primary')
|