Spaces:
Runtime error
Runtime error
File size: 1,068 Bytes
0685af6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
from main import run_query
from utils.general_utils import timeit
@timeit
def test_with_llm_video():
db_path = "data/single_video.db"
question = "What are the components of an LLM?"
print("Question: ", question)
answer = run_query(question,
db_path=db_path
)
print("Answer: ", answer)
@timeit
def test_with_subset():
db_path = "data/videos_subset_more_context.db"
question = "How should I train for anerobic capacity?"
print("Question: ", question)
answer = run_query(question,
db_path=db_path,
num_rel_segments=10,
llm_model="gpt-3.5-turbo-0125",
llm_temp=0.1
)
print("Answer: ", answer)
if __name__ == '__main__':
choice = input("Enter 1 for test_with_subset, 2 for test_with_llm_video: ")
if choice == "1":
test_with_subset()
elif choice == "2":
test_with_llm_video()
else:
print("Invalid choice")
exit(1) |