forked from opea-project/GenAIExamples
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from avbodas/abdev
Code cleanup
- Loading branch information
Showing
6 changed files
with
35 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# Path to all videos | ||
videos: VideoRAGQnA/video_ingest/videos/ | ||
videos: video_ingest/videos/ | ||
# Path to video description generated by open-source vision models (ex. video-llama, video-llava, etc.) | ||
description: VideoRAGQnA/video_ingest/scene_description/ | ||
description: video_ingest/scene_description/ | ||
# Do you want to extract frames of videos (True if not done already, else False) | ||
generate_frames: True | ||
# Do you wnat to generate image embeddings? | ||
embed_frames: True | ||
# Path to store extracted frames | ||
image_output_dir: VideoRAGQnA/video_ingest/frames/ | ||
image_output_dir: video_ingest/frames/ | ||
# Path to store metadata files | ||
meta_output_dir: VideoRAGQnA/video_ingest/frame_metadata/ | ||
meta_output_dir: video_ingest/frame_metadata/ | ||
# Number of frames to extract per second, | ||
# if 24 fps, and this value is 2, then it will extract 12th and 24th frame | ||
number_of_frames_per_second: 2 | ||
|
||
vector_db: | ||
choice_of_db: 'vdms' #'chroma' # #Supported databases [vdms, chroma] | ||
host: 10.190.167.193 | ||
port: 55556 #8000 # | ||
host: 0.0.0.0 | ||
port: 55555 #8000 # | ||
|
||
# LLM path | ||
model_path: VideoRAGQnA/ckpt/llama-2-7b-chat-hf | ||
model_path: meta-llama/Llama-2-7b-chat-hf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ streamlit | |
metafunctions | ||
sentence-transformers | ||
accelerate | ||
vdms | ||
vdms | ||
tzlocal | ||
dateparser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from jinja2 import Environment, BaseLoader | ||
|
||
PROMPT = open("VideoRAGQnA/utils/prompt_template.jinja2").read().strip() | ||
PROMPT = open("utils/prompt_template.jinja2").read().strip() | ||
|
||
def get_formatted_prompt(scene, prompt): | ||
env = Environment(loader=BaseLoader()) | ||
template = env.from_string(PROMPT) | ||
return template.render(scene=scene, prompt=prompt) | ||
return template.render(scene=scene, prompt=prompt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters