IbrahimHasani commited on
Commit
d6e2134
·
1 Parent(s): a6c8793

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -56,7 +56,7 @@ def model_interface(uploaded_video, model_choice, activity):
56
 
57
  activities_list = [activity, "other"]
58
 
59
- processor = AutoProcessor.from_pretrained(model_choice).to(device)
60
  model = AutoModel.from_pretrained(model_choice).to(device)
61
 
62
  # Convert the list of frames to a single numpy array for efficient conversion to a tensor
@@ -98,8 +98,8 @@ iface = gr.Interface(
98
  gr.components.Video(label="Upload a video file"),
99
  gr.components.Dropdown(choices=[
100
  "microsoft/xclip-base-patch16-zero-shot",
101
- "microsoft/xclip-base-patch32-16-frames",
102
- "microsoft/xclip-base-patch32"
103
  ], label="Model Choice"),
104
  gr.components.Textbox(default="dancing", label="Desired Activity to Recognize"),
105
  ],
 
56
 
57
  activities_list = [activity, "other"]
58
 
59
+ processor = AutoProcessor.from_pretrained(model_choice) # No .to(device) for the processor
60
  model = AutoModel.from_pretrained(model_choice).to(device)
61
 
62
  # Convert the list of frames to a single numpy array for efficient conversion to a tensor
 
98
  gr.components.Video(label="Upload a video file"),
99
  gr.components.Dropdown(choices=[
100
  "microsoft/xclip-base-patch16-zero-shot",
101
+ #"microsoft/xclip-base-patch32-16-frames",
102
+ #"microsoft/xclip-base-patch32"
103
  ], label="Model Choice"),
104
  gr.components.Textbox(default="dancing", label="Desired Activity to Recognize"),
105
  ],