Spaces:
Paused
Paused
CrispStrobe commited on
Commit ·
0ab9a0f
1
Parent(s): 661fb3d
Fix Number values and update return objects to stabilize startup
Browse files
app.py
CHANGED
|
@@ -847,8 +847,8 @@ with gr.Blocks() as iface:
|
|
| 847 |
)
|
| 848 |
|
| 849 |
with gr.Row():
|
| 850 |
-
start_time = gr.Number(label="Start Time (seconds)", value=
|
| 851 |
-
end_time = gr.Number(label="End Time (seconds)", value=
|
| 852 |
verbose = gr.Checkbox(label="Verbose Output", value=False)
|
| 853 |
include_timecodes = gr.Checkbox(label="Include timecodes in transcription", value=False)
|
| 854 |
|
|
@@ -871,9 +871,9 @@ with gr.Blocks() as iface:
|
|
| 871 |
model_choices = get_model_options(pipeline_type)
|
| 872 |
logging.info(f"Model choices for {pipeline_type}: {model_choices}")
|
| 873 |
if model_choices:
|
| 874 |
-
return gr.
|
| 875 |
else:
|
| 876 |
-
return gr.
|
| 877 |
except Exception as e:
|
| 878 |
logging.error(f"Error in update_model_dropdown: {str(e)}")
|
| 879 |
return gr.update(choices=["Error"], value="Error", visible=True)
|
|
|
|
| 847 |
)
|
| 848 |
|
| 849 |
with gr.Row():
|
| 850 |
+
start_time = gr.Number(label="Start Time (seconds)", value=0, minimum=0)
|
| 851 |
+
end_time = gr.Number(label="End Time (seconds)", value=0, minimum=0)
|
| 852 |
verbose = gr.Checkbox(label="Verbose Output", value=False)
|
| 853 |
include_timecodes = gr.Checkbox(label="Include timecodes in transcription", value=False)
|
| 854 |
|
|
|
|
| 871 |
model_choices = get_model_options(pipeline_type)
|
| 872 |
logging.info(f"Model choices for {pipeline_type}: {model_choices}")
|
| 873 |
if model_choices:
|
| 874 |
+
return gr.Dropdown(choices=model_choices, value=model_choices[0], visible=True)
|
| 875 |
else:
|
| 876 |
+
return gr.Dropdown(choices=["No models available"], value=None, visible=False)
|
| 877 |
except Exception as e:
|
| 878 |
logging.error(f"Error in update_model_dropdown: {str(e)}")
|
| 879 |
return gr.update(choices=["Error"], value="Error", visible=True)
|