Staticaliza commited on
Commit
7147f65
·
verified ·
1 Parent(s): f8a64f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -84,10 +84,13 @@ def generate(input, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7,
84
  if filetype == "Image":
85
  image = Image.open(input).convert("RGB")
86
  content.append(image)
87
- elif filetype in ["Video", "GIF"]:
88
- frames = encode_gif(input) if filetype == "GIF" else encode_video(input)
89
  content.extend(frames)
90
- audio = librosa.load(input, sr=16000, mono=True)
 
 
 
91
  content.append(audio)
92
  elif filetype == "Audio":
93
  audio = librosa.load(input, sr=16000, mono=True)
 
84
  if filetype == "Image":
85
  image = Image.open(input).convert("RGB")
86
  content.append(image)
87
+ elif filetype == "GIF":
88
+ frames = encode_gif(input_file)
89
  content.extend(frames)
90
+ elif filetype == "Video":
91
+ frames = encode_video(input_file)
92
+ content.extend(frames)
93
+ audio = librosa.load(input_file, sr=16000, mono=True)
94
  content.append(audio)
95
  elif filetype == "Audio":
96
  audio = librosa.load(input, sr=16000, mono=True)