Spaces:
Sleeping
Sleeping
Commit
Β·
717fa66
1
Parent(s):
240dd67
initial commit
Browse files- .gitignore +35 -0
- app.py +314 -0
- requirements.txt +54 -0
.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Python
|
2 |
+
__pycache__
|
3 |
+
*.pyc
|
4 |
+
*.egg-info
|
5 |
+
dist
|
6 |
+
|
7 |
+
# Log
|
8 |
+
*.log
|
9 |
+
*.log.*
|
10 |
+
logs/
|
11 |
+
# *.json
|
12 |
+
*.jsonl
|
13 |
+
images/*
|
14 |
+
|
15 |
+
# Data
|
16 |
+
!**/alpaca-data-conversation.json
|
17 |
+
|
18 |
+
# Editor
|
19 |
+
.idea
|
20 |
+
*.swp
|
21 |
+
.github
|
22 |
+
.vscode
|
23 |
+
|
24 |
+
# Other
|
25 |
+
.DS_Store
|
26 |
+
wandb
|
27 |
+
output
|
28 |
+
|
29 |
+
gradio_tmp/*
|
30 |
+
|
31 |
+
.ipynb_checkpoints
|
32 |
+
*.ipynb
|
33 |
+
|
34 |
+
unit_test*.*
|
35 |
+
|
app.py
ADDED
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
import torch
|
4 |
+
import numpy as np
|
5 |
+
from decord import VideoReader, cpu
|
6 |
+
import spaces
|
7 |
+
|
8 |
+
from llava import conversation as conversation_lib
|
9 |
+
from llava.constants import DEFAULT_IMAGE_TOKEN
|
10 |
+
|
11 |
+
from llava.constants import IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
|
12 |
+
from llava.conversation import conv_templates, SeparatorStyle
|
13 |
+
from llava.model.builder import load_pretrained_model
|
14 |
+
from llava.utils import disable_torch_init
|
15 |
+
from llava.mm_utils import tokenizer_image_token, get_model_name_from_path, process_images, KeywordsStoppingCriteria
|
16 |
+
|
17 |
+
from PIL import Image
|
18 |
+
import argparse
|
19 |
+
|
20 |
+
from transformers import TextIteratorStreamer
|
21 |
+
from threading import Thread
|
22 |
+
|
23 |
+
no_change_btn = gr.Button()
|
24 |
+
enable_btn = gr.Button(interactive=True)
|
25 |
+
disable_btn = gr.Button(interactive=False)
|
26 |
+
|
27 |
+
argparser = argparse.ArgumentParser()
|
28 |
+
argparser.add_argument("--server_name", default="0.0.0.0", type=str)
|
29 |
+
argparser.add_argument("--port", default="6324", type=str)
|
30 |
+
argparser.add_argument("--model-path", default="shi-labs/slowfast-video-mllm-qwen2-7b-convnext-576-frame96-s1t6", type=str)
|
31 |
+
argparser.add_argument("--model-base", type=str, default=None)
|
32 |
+
argparser.add_argument("--num-gpus", type=int, default=1)
|
33 |
+
argparser.add_argument("--conv-mode", type=str, default="qwen_1_5",)
|
34 |
+
argparser.add_argument("--temperature", type=float, default=0.2)
|
35 |
+
argparser.add_argument("--max-new-tokens", type=int, default=512)
|
36 |
+
argparser.add_argument("--num_frames", type=int, default=96)
|
37 |
+
argparser.add_argument("--load-8bit", action="store_true")
|
38 |
+
argparser.add_argument("--load-4bit", action="store_true")
|
39 |
+
argparser.add_argument("--debug", action="store_true")
|
40 |
+
|
41 |
+
args = argparser.parse_args()
|
42 |
+
model_path = args.model_path
|
43 |
+
conv_mode = args.conv_mode
|
44 |
+
max_num_frames=args.num_frames
|
45 |
+
filt_invalid="cut"
|
46 |
+
model_name = get_model_name_from_path(args.model_path)
|
47 |
+
tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, use_flash_attn=True)
|
48 |
+
our_chatbot = None
|
49 |
+
|
50 |
+
def load_video(video_path, max_frames_num):
|
51 |
+
vr = VideoReader(video_path, num_threads=4)
|
52 |
+
|
53 |
+
fps = round(vr.get_avg_fps())
|
54 |
+
frame_idx = [i for i in range(0, len(vr), fps)]
|
55 |
+
uniform_sampled_frames = np.linspace(0, len(vr) - 1, max_frames_num, dtype=int)
|
56 |
+
frame_idx = uniform_sampled_frames.tolist()
|
57 |
+
|
58 |
+
spare_frames = vr.get_batch(frame_idx).asnumpy()
|
59 |
+
return spare_frames
|
60 |
+
|
61 |
+
def upvote_last_response(state):
|
62 |
+
return ("",) + (disable_btn,) * 3
|
63 |
+
|
64 |
+
|
65 |
+
def downvote_last_response(state):
|
66 |
+
return ("",) + (disable_btn,) * 3
|
67 |
+
|
68 |
+
|
69 |
+
def flag_last_response(state):
|
70 |
+
return ("",) + (disable_btn,) * 3
|
71 |
+
|
72 |
+
def clear_history():
|
73 |
+
state =conv_templates[conv_mode].copy()
|
74 |
+
return (state, state.to_gradio_chatbot(), "", None) + (disable_btn,) * 5
|
75 |
+
|
76 |
+
def add_text(state, video_input, textbox, image_process_mode):
|
77 |
+
# print("add-text")
|
78 |
+
if state is None:
|
79 |
+
state = conv_templates[conv_mode].copy()
|
80 |
+
|
81 |
+
if video_input is not None:
|
82 |
+
textbox = DEFAULT_IMAGE_TOKEN + '\n' + textbox
|
83 |
+
# image = Image.open(imagebox).convert('RGB')
|
84 |
+
|
85 |
+
if video_input is not None:
|
86 |
+
textbox = (textbox, video_input, image_process_mode)
|
87 |
+
state.video_input = video_input
|
88 |
+
# textbox = (textbox, video_input)
|
89 |
+
|
90 |
+
state.append_message(state.roles[0], textbox)
|
91 |
+
state.append_message(state.roles[1], None)
|
92 |
+
|
93 |
+
yield (state, state.to_gradio_chatbot(), "", None) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
|
94 |
+
# yield (state, None, "", None) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
|
95 |
+
|
96 |
+
def delete_text(state, image_process_mode):
|
97 |
+
state.messages[-1][-1] = None
|
98 |
+
prev_human_msg = state.messages[-2]
|
99 |
+
if type(prev_human_msg[1]) in (tuple, list):
|
100 |
+
prev_human_msg[1] = (*prev_human_msg[1][:2], image_process_mode)
|
101 |
+
yield (state, state.to_gradio_chatbot(), "", None) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
|
102 |
+
|
103 |
+
def regenerate(state, image_process_mode):
|
104 |
+
state.messages[-1][-1] = None
|
105 |
+
prev_human_msg = state.messages[-2]
|
106 |
+
if type(prev_human_msg[1]) in (tuple, list):
|
107 |
+
prev_human_msg[1] = (*prev_human_msg[1][:2], image_process_mode)
|
108 |
+
state.skip_next = False
|
109 |
+
return (state, state.to_gradio_chatbot(), "", None) + (disable_btn,) * 5
|
110 |
+
|
111 |
+
@spaces.GPU
|
112 |
+
def generate(state, video_input, textbox, image_process_mode, temperature, top_p, repetition_penalty, max_output_tokens):
|
113 |
+
prompt = state.get_prompt()
|
114 |
+
|
115 |
+
ori_prompt = prompt
|
116 |
+
num_image_tokens = 0
|
117 |
+
|
118 |
+
video = load_video(state.video_input, max_frames_num=max_num_frames)
|
119 |
+
video_tensor = image_processor.preprocess(video, return_tensors="pt")["pixel_values"].half().cuda()
|
120 |
+
videos = [video_tensor]
|
121 |
+
|
122 |
+
max_context_length = getattr(model.config, 'max_position_embeddings', 8192)
|
123 |
+
max_new_tokens = max_output_tokens
|
124 |
+
do_sample = True if temperature > 0.001 else False
|
125 |
+
|
126 |
+
input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors='pt')
|
127 |
+
input_ids = input_ids.to(device='cuda', non_blocking=True).unsqueeze(dim=0)
|
128 |
+
|
129 |
+
streamer = TextIteratorStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True, timeout=15)
|
130 |
+
max_new_tokens = min(max_new_tokens, max_context_length - input_ids.shape[-1] - num_image_tokens)
|
131 |
+
|
132 |
+
if max_new_tokens < 1:
|
133 |
+
# yield json.dumps({"text": ori_prompt + "Exceeds max token length. Please start a new conversation, thanks.", "error_code": 0}).encode() + b"\0"
|
134 |
+
return
|
135 |
+
|
136 |
+
# stop_str = state.sep if state.sep_style in [SeparatorStyle.SINGLE, SeparatorStyle.MPT] else state.sep2
|
137 |
+
stop_str = state.sep
|
138 |
+
|
139 |
+
with torch.inference_mode():
|
140 |
+
thread = Thread(target=model.generate,
|
141 |
+
kwargs=dict(
|
142 |
+
inputs=input_ids,
|
143 |
+
images=videos,
|
144 |
+
do_sample=do_sample,
|
145 |
+
temperature=temperature,
|
146 |
+
top_p=top_p,
|
147 |
+
repetition_penalty=repetition_penalty,
|
148 |
+
max_new_tokens=max_new_tokens,
|
149 |
+
streamer=streamer,
|
150 |
+
use_cache=True)
|
151 |
+
)
|
152 |
+
|
153 |
+
thread.start()
|
154 |
+
generated_text = ''
|
155 |
+
for new_text in streamer:
|
156 |
+
generated_text += new_text
|
157 |
+
if generated_text.endswith(stop_str):
|
158 |
+
generated_text = generated_text[:-len(stop_str)]
|
159 |
+
state.messages[-1][-1] = generated_text
|
160 |
+
yield (state, state.to_gradio_chatbot(), "", None) + (disable_btn, disable_btn, disable_btn, enable_btn, enable_btn)
|
161 |
+
|
162 |
+
yield (state, state.to_gradio_chatbot(), "", None) + (enable_btn,) * 5
|
163 |
+
|
164 |
+
torch.cuda.empty_cache()
|
165 |
+
|
166 |
+
txt = gr.Textbox(
|
167 |
+
scale=4,
|
168 |
+
show_label=False,
|
169 |
+
placeholder="Enter text and press enter.",
|
170 |
+
container=False,
|
171 |
+
)
|
172 |
+
|
173 |
+
|
174 |
+
title_markdown = ("""
|
175 |
+
# Slow-Fast Architecture for Video Multi-Modal Large Language Models
|
176 |
+
[[Code](https://github.com/SHI-Labs/Slow-Fast-Video-Multimodal-LLM)] | [[Model](https://huggingface.co/collections/shi-labs/slow-fast-video-mllm-67ef347a28772734c15a78b5)] | π [[Arxiv](https://arxiv.org/abs/2504.01328)]
|
177 |
+
""")
|
178 |
+
|
179 |
+
attention_markdown = ("""
|
180 |
+
### β οΈAttentionβ οΈ
|
181 |
+
+ Please upload a video before starting a conversation. Pure text input is not supported in this demo.
|
182 |
+
+ To switch to a new video, make sure to **clear** the chat history first.
|
183 |
+
+ This is a simple demo showcasing the video understanding capabilities of our model. Some known or unknown bugs may still exist.
|
184 |
+
""")
|
185 |
+
|
186 |
+
tos_markdown = ("""
|
187 |
+
### Terms of use
|
188 |
+
By using this service, users are required to agree to the following terms:
|
189 |
+
The service is a research preview intended for non-commercial use only. It only provides limited safety measures and may generate offensive content. It must not be used for any illegal, harmful, violent, racist, or sexual purposes. The service may collect user dialogue data for future research. For an optimal experience, please use desktop computers for this demo, as mobile devices may compromise its quality.
|
190 |
+
""")
|
191 |
+
|
192 |
+
|
193 |
+
learn_more_markdown = ("""
|
194 |
+
### License
|
195 |
+
The service is a research preview intended for non-commercial use only, subject to the. Please contact us if you find any potential violation.
|
196 |
+
""")
|
197 |
+
|
198 |
+
block_css = """
|
199 |
+
#buttons button {
|
200 |
+
min-width: min(120px,100%);
|
201 |
+
}
|
202 |
+
"""
|
203 |
+
|
204 |
+
textbox = gr.Textbox(show_label=False, placeholder="Enter text and press ENTER", container=False)
|
205 |
+
with gr.Blocks(title="Slow-Fast Video MLLM", theme=gr.themes.Default(), css=block_css) as demo:
|
206 |
+
state = gr.State()
|
207 |
+
|
208 |
+
gr.Markdown(title_markdown)
|
209 |
+
|
210 |
+
with gr.Row():
|
211 |
+
with gr.Column(scale=3):
|
212 |
+
# video_input = gr.Image(label="Input Image", type="filepath")
|
213 |
+
video_input = gr.Video(label="Input Video")
|
214 |
+
image_process_mode = gr.Radio(
|
215 |
+
["Crop", "Resize", "Pad", "Default"],
|
216 |
+
value="Default",
|
217 |
+
label="Preprocess for non-square image", visible=False)
|
218 |
+
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
219 |
+
gr.Examples(examples=[
|
220 |
+
[f"{cur_dir}/assets/cuda-introduction.mp4", "Tell me the function of the given CUDA programming example."],
|
221 |
+
[f"{cur_dir}/assets/catinterrupt.mp4", "Provide a detailed description of this video."],
|
222 |
+
[f"{cur_dir}/assets/marinated_salmon.mp4", "Please list all the steps to make this dish."],
|
223 |
+
[f"{cur_dir}/assets/hero.mp4", "Why is the little girl begging on the street?"],
|
224 |
+
], inputs=[video_input, textbox], cache_examples=False)
|
225 |
+
|
226 |
+
with gr.Accordion("Parameters", open=False) as parameter_row:
|
227 |
+
temperature = gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, interactive=True, label="Temperature",)
|
228 |
+
top_p = gr.Slider(minimum=0.0, maximum=1.0, value=0.8, step=0.1, interactive=True, label="Top P",)
|
229 |
+
max_output_tokens = gr.Slider(minimum=0, maximum=2048, value=1024, step=64, interactive=True, label="Max output tokens",)
|
230 |
+
repetition_penalty = gr.Slider(minimum=1.0, maximum=1.2, value=1.1, step=0.05, interactive=True, label="Repetition penalty")
|
231 |
+
|
232 |
+
with gr.Column(scale=8):
|
233 |
+
chatbot = gr.Chatbot(
|
234 |
+
elem_id="chatbot",
|
235 |
+
label="Slow-Fast MLLM",
|
236 |
+
height=650,
|
237 |
+
# layout="panel",
|
238 |
+
)
|
239 |
+
with gr.Row():
|
240 |
+
with gr.Column(scale=8):
|
241 |
+
textbox.render()
|
242 |
+
with gr.Column(scale=1, min_width=50):
|
243 |
+
submit_btn = gr.Button(value="Send", variant="primary")
|
244 |
+
with gr.Row(elem_id="buttons") as button_row:
|
245 |
+
upvote_btn = gr.Button(value="π Upvote", interactive=False)
|
246 |
+
downvote_btn = gr.Button(value="π Downvote", interactive=False)
|
247 |
+
flag_btn = gr.Button(value="β οΈ Flag", interactive=False)
|
248 |
+
#stop_btn = gr.Button(value="βΉοΈ Stop Generation", interactive=False)
|
249 |
+
regenerate_btn = gr.Button(value="π Regenerate", interactive=False)
|
250 |
+
clear_btn = gr.Button(value="ποΈ Clear", interactive=False)
|
251 |
+
|
252 |
+
gr.Markdown(attention_markdown)
|
253 |
+
gr.Markdown(tos_markdown)
|
254 |
+
gr.Markdown(learn_more_markdown)
|
255 |
+
url_params = gr.JSON(visible=False)
|
256 |
+
|
257 |
+
# Register listeners
|
258 |
+
btn_list = [upvote_btn, downvote_btn, flag_btn, regenerate_btn, clear_btn]
|
259 |
+
upvote_btn.click(
|
260 |
+
upvote_last_response,
|
261 |
+
[state],
|
262 |
+
[textbox, upvote_btn, downvote_btn, flag_btn]
|
263 |
+
)
|
264 |
+
downvote_btn.click(
|
265 |
+
downvote_last_response,
|
266 |
+
[state],
|
267 |
+
[textbox, upvote_btn, downvote_btn, flag_btn]
|
268 |
+
)
|
269 |
+
flag_btn.click(
|
270 |
+
flag_last_response,
|
271 |
+
[state],
|
272 |
+
[textbox, upvote_btn, downvote_btn, flag_btn]
|
273 |
+
)
|
274 |
+
|
275 |
+
clear_btn.click(
|
276 |
+
clear_history,
|
277 |
+
None,
|
278 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
279 |
+
queue=False
|
280 |
+
)
|
281 |
+
|
282 |
+
regenerate_btn.click(
|
283 |
+
delete_text,
|
284 |
+
[state, image_process_mode],
|
285 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
286 |
+
).then(
|
287 |
+
generate,
|
288 |
+
[state, video_input, textbox, image_process_mode, temperature, top_p, repetition_penalty, max_output_tokens],
|
289 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
290 |
+
)
|
291 |
+
textbox.submit(
|
292 |
+
add_text,
|
293 |
+
[state, video_input, textbox, image_process_mode],
|
294 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
295 |
+
).then(
|
296 |
+
generate,
|
297 |
+
[state, video_input, textbox, image_process_mode, temperature, top_p, repetition_penalty, max_output_tokens],
|
298 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
299 |
+
)
|
300 |
+
|
301 |
+
submit_btn.click(
|
302 |
+
add_text,
|
303 |
+
[state, video_input, textbox, image_process_mode],
|
304 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
305 |
+
).then(
|
306 |
+
generate,
|
307 |
+
[state, video_input, textbox, image_process_mode, temperature, top_p, repetition_penalty, max_output_tokens],
|
308 |
+
[state, chatbot, textbox, video_input] + btn_list,
|
309 |
+
)
|
310 |
+
|
311 |
+
demo.queue(
|
312 |
+
status_update_rate=10,
|
313 |
+
api_open=False
|
314 |
+
).launch()
|
requirements.txt
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
accelerate==0.34.0
|
2 |
+
av==12.3.0
|
3 |
+
datasets==2.16.1
|
4 |
+
decord==0.6.0
|
5 |
+
hf_transfer==0.1.9
|
6 |
+
hjson==3.1.0
|
7 |
+
httpcore==0.17.3
|
8 |
+
httpx==0.24.0
|
9 |
+
huggingface-hub==0.28.1
|
10 |
+
hydra-core==1.3.2
|
11 |
+
idna==3.10
|
12 |
+
numpy==1.26.1
|
13 |
+
omegaconf==2.3.0
|
14 |
+
opencv-python==4.11.0.86
|
15 |
+
peft==0.4.0
|
16 |
+
wandb==0.18.7
|
17 |
+
transformers==4.45.1
|
18 |
+
anyio==4.3.0
|
19 |
+
audioread==3.0.1
|
20 |
+
av==12.3.0
|
21 |
+
datasets==2.16.1
|
22 |
+
einops==0.6.1
|
23 |
+
einops-exts==0.0.4
|
24 |
+
ffmpy==0.3.2
|
25 |
+
fvcore
|
26 |
+
gradio==4.43.0
|
27 |
+
gradio_client==1.3.0
|
28 |
+
ninja==1.11.1.1
|
29 |
+
notebook==6.4.10
|
30 |
+
numpy==1.26.1
|
31 |
+
open_clip_torch==2.26.1
|
32 |
+
peft==0.4.0
|
33 |
+
protobuf==4.24.4
|
34 |
+
pyzmq==25.1.1
|
35 |
+
safetensors==0.4.3
|
36 |
+
scikit-learn==1.2.2
|
37 |
+
scipy==1.11.1
|
38 |
+
sentencepiece==0.1.99
|
39 |
+
spacy==3.7.1
|
40 |
+
spacy-legacy==3.0.12
|
41 |
+
spacy-loggers==1.0.5
|
42 |
+
torch==2.1.2 --index-url https://download.pytorch.org/whl/cu121
|
43 |
+
torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu121
|
44 |
+
torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu121
|
45 |
+
timm==0.9.11
|
46 |
+
toml==0.10.2
|
47 |
+
tqdm==4.66.1
|
48 |
+
loguru==0.7.3
|
49 |
+
tenacity
|
50 |
+
sqlitedict
|
51 |
+
evaluate==0.4.3
|
52 |
+
sacrebleu==2.5.1
|
53 |
+
pytablewriter==1.2.1
|
54 |
+
pytest==8.3.5
|