Gijs Wijngaard commited on
Commit
ce70672
·
1 Parent(s): 471da98
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -76,13 +76,7 @@ def process_output(output):
76
  @spaces.GPU
77
  def process_audio_streaming(audio_file, model_choice):
78
  # Load the selected model
79
- if model_choice == "Think":
80
- model_path = model_path_1
81
- elif model_choice == "Think + Semantics":
82
- model_path = model_path_2
83
- else: # Default option
84
- model_path = base_model_id
85
-
86
  model, processor = load_model(model_path)
87
 
88
  # Load and process the audio with torchaudio
@@ -151,7 +145,7 @@ audio_demo = gr.Interface(
151
  fn=process_audio_streaming,
152
  inputs=[
153
  gr.Audio(type="filepath", label="Upload Audio"),
154
- gr.Radio(["Default", "Think", "Think + Semantics"], label="Select Model", value="Default")
155
  ],
156
  outputs=gr.Textbox(label="Generated Output", lines=30),
157
  title="SemThink",
 
76
  @spaces.GPU
77
  def process_audio_streaming(audio_file, model_choice):
78
  # Load the selected model
79
+ model_path = model_path_1 if model_choice == "Think" else model_path_2
 
 
 
 
 
 
80
  model, processor = load_model(model_path)
81
 
82
  # Load and process the audio with torchaudio
 
145
  fn=process_audio_streaming,
146
  inputs=[
147
  gr.Audio(type="filepath", label="Upload Audio"),
148
+ gr.Radio(["Think", "Think + Semantics"], label="Select Model", value="Think + Semantics")
149
  ],
150
  outputs=gr.Textbox(label="Generated Output", lines=30),
151
  title="SemThink",