marks
commited on
Commit
·
e36cfeb
1
Parent(s):
6a548ba
Should work
Browse files
app.py
CHANGED
|
@@ -57,17 +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][
|
| 62 |
-
type="
|
| 63 |
)
|
| 64 |
|
| 65 |
with gr.Column():
|
| 66 |
voice_model = gr.Dropdown(
|
| 67 |
label='Voice',
|
| 68 |
-
choices=self.voices
|
| 69 |
-
value=self.voices[0][
|
| 70 |
-
type="
|
| 71 |
)
|
| 72 |
|
| 73 |
submit_btn = gr.Button('Generate Podcast', variant='primary')
|
|
|
|
| 57 |
with gr.Column():
|
| 58 |
openrouter_model = gr.Dropdown(
|
| 59 |
label='AI Model',
|
| 60 |
+
choices=[(name, id) for id, name in self.models], # Swap order for display
|
| 61 |
+
value=self.models[0][1] if len(self.models) > 1 else None,
|
| 62 |
+
type="index" # Use index to get the second element (id) from tuple
|
| 63 |
)
|
| 64 |
|
| 65 |
with gr.Column():
|
| 66 |
voice_model = gr.Dropdown(
|
| 67 |
label='Voice',
|
| 68 |
+
choices=[(name, id) for id, name in self.voices], # Swap order for display
|
| 69 |
+
value=self.voices[0][1] if len(self.voices) > 1 else None,
|
| 70 |
+
type="index" # Use index to get the second element (id) from tuple
|
| 71 |
)
|
| 72 |
|
| 73 |
submit_btn = gr.Button('Generate Podcast', variant='primary')
|