|
24 | 24 | "from amadeusgpt.config import Config\n", |
25 | 25 | "from amadeusgpt.utils import parse_result\n", |
26 | 26 | "import amadeusgpt\n", |
27 | | - "from pathlib import Path\n", |
| 27 | + "from amadeusgpt import create_project\n", |
28 | 28 | "import matplotlib.pyplot as plt\n", |
29 | 29 | "import cv2" |
30 | 30 | ] |
|
41 | 41 | }, |
42 | 42 | { |
43 | 43 | "cell_type": "code", |
44 | | - "execution_count": 4, |
| 44 | + "execution_count": 3, |
45 | 45 | "id": "be76dc87-fbe8-452f-b85c-2af3e95a03bf", |
46 | 46 | "metadata": {}, |
47 | 47 | "outputs": [ |
48 | 48 | { |
49 | | - "name": "stderr", |
| 49 | + "name": "stdout", |
50 | 50 | "output_type": "stream", |
51 | 51 | "text": [ |
52 | | - "INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\n" |
| 52 | + "Project created at temp_result_folder. Results will be saved to temp_result_folder\n", |
| 53 | + "The project will load video files (*..mp4) and optionally keypoint files from temp_data_folder\n", |
| 54 | + "A copy of the project config file is saved at temp_result_folder/config.yaml\n", |
| 55 | + "{'data_info': {'data_folder': 'temp_data_folder',\n", |
| 56 | + " 'result_folder': 'temp_result_folder',\n", |
| 57 | + " 'video_suffix': '.mp4'},\n", |
| 58 | + " 'llm_info': {'max_tokens': 4096, 'temperature': 1.0}}\n", |
| 59 | + "No video files found in the data folder temp_data_folder. Please check the data folder and the video suffix\n" |
53 | 60 | ] |
54 | 61 | }, |
55 | 62 | { |
56 | | - "name": "stdout", |
57 | | - "output_type": "stream", |
58 | | - "text": [ |
59 | | - "current total cost 0.004 $\n", |
60 | | - "current input tokens 25667\n", |
61 | | - "current accumulated tokens 25843\n", |
62 | | - "['/Users/shaokaiye/OFT/OFT_43_short.mp4']\n" |
| 63 | + "ename": "AttributeError", |
| 64 | + "evalue": "'AMADEUS' object has no attribute 'sandbox'", |
| 65 | + "output_type": "error", |
| 66 | + "traceback": [ |
| 67 | + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
| 68 | + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", |
| 69 | + "Cell \u001b[0;32mIn[3], line 13\u001b[0m\n\u001b[1;32m 10\u001b[0m config[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mscene_frame_number\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m scene_frame_number\n\u001b[1;32m 12\u001b[0m amadeus \u001b[38;5;241m=\u001b[39m AMADEUS(config)\n\u001b[0;32m---> 13\u001b[0m video_file_paths \u001b[38;5;241m=\u001b[39m \u001b[43mamadeus\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_video_file_paths\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28mprint\u001b[39m (video_file_paths)\n", |
| 70 | + "File \u001b[0;32m~/AmadeusGPT-dev/amadeusgpt/main.py:121\u001b[0m, in \u001b[0;36mAMADEUS.get_video_file_paths\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 120\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget_video_file_paths\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mlist\u001b[39m[\u001b[38;5;28mstr\u001b[39m]:\n\u001b[0;32m--> 121\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msandbox\u001b[49m\u001b[38;5;241m.\u001b[39mvideo_file_paths\n", |
| 71 | + "\u001b[0;31mAttributeError\u001b[0m: 'AMADEUS' object has no attribute 'sandbox'" |
63 | 72 | ] |
64 | 73 | } |
65 | 74 | ], |
66 | 75 | "source": [ |
67 | 76 | "scene_frame_number = 400\n", |
68 | | - "amadeus_root = Path(amadeusgpt.__file__).parent.parent\n", |
69 | | - "config = Config(amadeus_root / \"amadeusgpt/configs/template.yaml\")\n", |
70 | | - "config['data_info']['data_folder'] = \"/Users/shaokaiye/OFT\"\n", |
| 77 | + "\n", |
| 78 | + "# where you store you video and (optionally) keypoint files\n", |
| 79 | + "data_folder = \"temp_data_folder\"\n", |
| 80 | + "result_folder = \"temp_result_folder\"\n", |
| 81 | + "video_suffix = \".mp4\"\n", |
| 82 | + "\n", |
| 83 | + "config = create_project(data_folder, result_folder, video_suffix = video_suffix)\n", |
| 84 | + "\n", |
| 85 | + "config[\"scene_frame_number\"] = scene_frame_number\n", |
71 | 86 | "\n", |
72 | 87 | "amadeus = AMADEUS(config)\n", |
73 | 88 | "video_file_paths = amadeus.get_video_file_paths()\n", |
|
0 commit comments