reab5555 commited on
Commit
cd680cf
·
verified ·
1 Parent(s): 71973e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ import tempfile
11
  import os
12
 
13
  # Global variables
14
- input_labels_X = "Happy Face, Sad Face, Angry Face, Fear Face, Disgust Face, Contempt Face, Nervous Face, Curious Face, Flirtatious Face, Ashamed Face, Bored Face, Confused Face, Calm Face, Proud Face, Guilty Face, Annoyed Face, Desperate Face, Jealous Face, Embarrassed Face, Impatient Face, Uncomfortable Face, Bitter Face, Helpless Face, Shy Face, Infatuated Face, Betrayed Face, Shocked Face, Relaxed Face, Apathetic Face, Neutral Face"
15
 
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  model, preprocess = clip.load("ViT-B/16", device=device)
@@ -103,7 +103,7 @@ def process_video(input_video, selected_model, progress=gr.Progress()):
103
  fourcc = cv2.VideoWriter_fourcc(*'mp4v')
104
  out = cv2.VideoWriter(output_path, fourcc, fps, (width, height))
105
 
106
- batch_size = 16
107
  frames = []
108
  frame_count = 0
109
 
 
11
  import os
12
 
13
  # Global variables
14
+ input_labels_X = "Happy Face, Sad Face, Angry Face, Fear Face, Disgust Face, Contempt Face, Nervous Face, Curious Face, Flirtatious Face, Ashamed Face, Bored Face, Confused Face, Calm Face, Proud Face, Guilty Face, Annoyed Face, Desperate Face, Jealous Face, Embarrassed Face, Uncomfortable Face, Helpless Face, Shy Face, Infatuated Face, Apathetic Face, Neutral Face"
15
 
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  model, preprocess = clip.load("ViT-B/16", device=device)
 
103
  fourcc = cv2.VideoWriter_fourcc(*'mp4v')
104
  out = cv2.VideoWriter(output_path, fourcc, fps, (width, height))
105
 
106
+ batch_size = 64
107
  frames = []
108
  frame_count = 0
109