prithivMLmods commited on
Commit
d427116
·
verified ·
1 Parent(s): 83c8eb3

update app

Browse files
Files changed (1) hide show
  1. app.py +1 -14
app.py CHANGED
@@ -129,15 +129,6 @@ model_q = Qwen3VLForConditionalGeneration.from_pretrained(
129
  torch_dtype=torch.float16
130
  ).to(device).eval()
131
 
132
- # Load Qwen3-VL-8B-Instruct
133
- MODEL_ID_Y = "Qwen/Qwen3-VL-8B-Instruct"
134
- processor_y = AutoProcessor.from_pretrained(MODEL_ID_Y, trust_remote_code=True)
135
- model_y = Qwen3VLForConditionalGeneration.from_pretrained(
136
- MODEL_ID_Y,
137
- trust_remote_code=True,
138
- torch_dtype=torch.float16
139
- ).to(device).eval()
140
-
141
  def downsample_video(video_path):
142
  """
143
  Downsamples the video to evenly spaced frames.
@@ -176,8 +167,6 @@ def generate_image(model_name: str, text: str, image: Image.Image,
176
  processor, model = processor_x, model_x
177
  elif model_name == "Qwen3-VL-4B-Instruct":
178
  processor, model = processor_q, model_q
179
- elif model_name == "Qwen3-VL-8B-Instruct":
180
- processor, model = processor_y, model_y
181
  else:
182
  yield "Invalid model selected.", "Invalid model selected."
183
  return
@@ -216,8 +205,6 @@ def generate_video(model_name: str, text: str, video_path: str,
216
  processor, model = processor_x, model_x
217
  elif model_name == "Qwen3-VL-4B-Instruct":
218
  processor, model = processor_q, model_q
219
- elif model_name == "Qwen3-VL-8B-Instruct":
220
- processor, model = processor_y, model_y
221
  else:
222
  yield "Invalid model selected.", "Invalid model selected."
223
  return
@@ -312,7 +299,7 @@ with gr.Blocks(css=css, theme=steel_blue_theme) as demo:
312
  markdown_output = gr.Markdown()
313
 
314
  model_choice = gr.Radio(
315
- choices=["Qwen3-VL-4B-Instruct", "Qwen3-VL-8B-Instruct", "Qwen2.5-VL-3B-Instruct", "Qwen2.5-VL-7B-Instruct"],
316
  label="Select Model",
317
  value="Qwen3-VL-4B-Instruct"
318
  )
 
129
  torch_dtype=torch.float16
130
  ).to(device).eval()
131
 
 
 
 
 
 
 
 
 
 
132
  def downsample_video(video_path):
133
  """
134
  Downsamples the video to evenly spaced frames.
 
167
  processor, model = processor_x, model_x
168
  elif model_name == "Qwen3-VL-4B-Instruct":
169
  processor, model = processor_q, model_q
 
 
170
  else:
171
  yield "Invalid model selected.", "Invalid model selected."
172
  return
 
205
  processor, model = processor_x, model_x
206
  elif model_name == "Qwen3-VL-4B-Instruct":
207
  processor, model = processor_q, model_q
 
 
208
  else:
209
  yield "Invalid model selected.", "Invalid model selected."
210
  return
 
299
  markdown_output = gr.Markdown()
300
 
301
  model_choice = gr.Radio(
302
+ choices=["Qwen3-VL-4B-Instruct", "Qwen2.5-VL-3B-Instruct", "Qwen2.5-VL-7B-Instruct"],
303
  label="Select Model",
304
  value="Qwen3-VL-4B-Instruct"
305
  )